Hi, i'm a italian Student. sorry for my english.
this is the class of , my service:
[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
<?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
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] =>
)
|