1
votes

I have a soap lite client consuming a wcf service. I tested everything on basichttpbinding and it works fine. When I switch the binding to wshttpbinding:

<endpoint binding="wsHttpBinding" bindingConfiguration="customWsBinding"
          contract="LogisticServiceLibrary.ILogisticService" />

and changed the soap lite version to use 1.2:

$client = SOAP::Lite
        ->proxy($endpoint)
    ->soapversion('1.2');

then it gives me an error and below is the output from SOAPUI:

Wed Nov 30 18:36:14 EST 2011:DEBUG:>> "POST /LogisticService
HTTP/1.1[\r][\n]" Wed Nov 30 18:36:14 EST 2011:DEBUG:>> "TE:
deflate,gzip;q=0.3[\r][\n]" Wed Nov 30 18:36:14 EST 2011:DEBUG:>>
"Connection: TE, close[\r][\n]" Wed Nov 30 18:36:14 EST 2011:DEBUG:>>
"Accept: text/xml[\r][\n]" Wed Nov 30 18:36:14 EST 2011:DEBUG:>>
"Accept: multipart/*[\r][\n]" Wed Nov 30 18:36:14 EST 2011:DEBUG:>>
"Accept: application/soap[\r][\n]" Wed Nov 30 18:36:14 EST
2011:DEBUG:>> "User-Agent: SOAP::Lite/Perl/0.712[\r][\n]" Wed Nov 30
18:36:14 EST 2011:DEBUG:>> "Content-Length: 49496[\r][\n]" Wed Nov 30
18:36:14 EST 2011:DEBUG:>> "Content-Type: application/soap+xml;
charset=utf-8[\r][\n]" Wed Nov 30 18:36:14 EST 2011:DEBUG:>>
"SOAPAction: http://tempuri.org/ILogisticService/IssueOrder[\r][\n]"
Wed Nov 30 18:36:14 EST 2011:DEBUG:>> "Host: localhost:8008[\r][\n]"
Wed Nov 30 18:36:14 EST 2011:DEBUG:>> "[\r][\n]" Wed Nov 30 18:36:14
EST 2011:DEBUG:>> " xmlns:namesp1="http://namespaces.soaplite.com/perl"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> xmlns="http://tempuri.org/"> xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns=""
xmlns:a="http://schemas.datacontract.org/2004/07/LogisticServiceLibrary"
Wed Nov 30 18:36:14 EST 2011:DEBUG:<< "HTTP/1.1 400 Bad
Request[\r][\n]" Wed Nov 30 18:36:14 EST 2011:DEBUG:<< "HTTP/1.1 400
Bad Request[\r][\n]" Wed Nov 30 18:36:14 EST 2011:DEBUG:<<
"Content-Length: 0[\r][\n]" Wed Nov 30 18:36:14 EST 2011:DEBUG:<<
"Server: Microsoft-HTTPAPI/1.0[\r][\n]" Wed Nov 30 18:36:14 EST
2011:DEBUG:<< "Date: Wed, 30 Nov 2011 23:36:14 GMT[\r][\n]" Wed Nov 30
18:36:14 EST 2011:DEBUG:<< "[\r][\n]"

It says 400 Bad Request... Any idea what's going on?

1
I have gotten past that point now after reading this: link now another problem occures. Has anyone actually configured soap lite to work with wshttpbinding before?gavin

1 Answers

2
votes

Using WSHttpBinding requires that the client speak SOAP 1.2 and also understand ws-addressing, ws-reliablemessaging, ws-security, ws-policy and ws-policyassertion. I doubt SOAP::Lite understands any of that, hence the "Lite" nomenclature. BasicHttpBinding is pretty basic, just like SOAP::Lite :)