NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
configure web service .asmx with nusoam in php


Joined: 20 Dec 2010
Posts: 1
Location: IT
Reply with quote
Hi, i'm a italian Student. sorry for my english.
this is the class of , my service:


Code:


[WebMethod]
    public void insertDataInRepository(String RDFData)
    {
 
        Repository repo = new HTTPRepository("http://localhost:8500/openrdf-sesame", "11");
        try
        {
            repo.initialize();
            RepositoryConnection con = repo.getConnection();
            if (rdfContent != null)
            {

                java.io.StringReader sr = new java.io.StringReader(rdfContent);


                try
                {
                    con.add(sr, "", RDFFormat.RDFXML);
                    con.commit();
                }
                catch (RDFParseException e1)
                {
                    e1.printStackTrace();
                }

                con.close();
                repo.shutDown();
            }
        }
        catch (Exception e)
        {
            System.Console.Error.WriteLine("Caught Exception: ");
            java.lang.Throwable.instancehelper_printStackTrace(e);
        }
    }
    //fine web method



this is, my file php
Code:


<?php
require_once('libs/nusoap.php');

$client=new SoapClient('http://localhost:1286/WebSite1/Service.asmx?WSDL');

$RDFData=array('<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <insertDataInRepository xmlns="http://tempuri.org/">
      <RDFData>string</RDFData>
    </insertDataInRepository>
  </soap:Body>
</soap:Envelope>');


$return=$client->call('insertDataInRepository',$RDFData);
print_r($return);
?>



when calling the php file I get this error

Code:

Array
(
    [faultcode] => soap:Client
    [faultstring] => System.Web.Services.Protocols.SoapException: Valore dell'intestazione HTTP non riconosciuto dal server SOAPAction: .
   in System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
   in System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message)
   in System.Web.Services.Protocols.SoapServerProtocol.Initialize()
   in System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response)
   in System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
    [detail] =>
)

View user's profileFind all posts by angelo85ctSend private messageSend e-mail
configure web service .asmx with nusoam in php
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic