| Jacob Colding 2004-03-11, 4:33 am |
| Hello all,
My system setup is
WCS 5.5 Fix Pack 2
WSAD 5.1.0.3
DB2 v8.1.3.132
I have tried to implement a webservice, that will enable me to execute
a registered controller command via a webservice call. I have tried to
follow the "Web Services Implementation Guide", which IMHO is very
shallow on the details of the components required to create a
webservice.
* I have created a new controller command (MyNewCmd and MyNewCmdImpl)
and registered it in URLREG and CMDREG.
* I have created a new jsp to send the response back to the client.
* I have created a WSDL defining the webservice.
* I have enabled WCS.SOAPINTEGRATION in demo_dev.xml
* I have created an entry in webservice_template.xml for the webservice
method.
My problem is that the rpcrouter doesn't seem to recognize my SOAP XML.
I am using Microsoft .Net Webservice Studio 2.0 (because clients will
be MS .Net clients). I get the same results if creating a Java proxy
inside WSAD though. Below is attached the SOAP message that is sent to
the server
*****************''
ResponseCode: 500 (Internal Server Error)
Server:WebSphere Application Server/5.0
Expires:Thu, 01 Dec 1994 16:00:00 GMT
Set- Cookie:JSESSIONID=0000sAMWMFFP7kC1uUG74Z
gALWK:-1;Path=/
Cache-Control:no-cache="set-cookie,set-cookie2"
Content-Type:text/xml; charset=utf-8
Content-Length:500
Content-Language:da-DK
<?xml version="1.0" encoding="utf-16"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.
org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>service 'http://www.e2efactory.com/BlueCom'
unknown</faultstring>
<faultactor>/webapp/wcs/stores/rpcrouter</faultactor>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
*******************
The WSDL I have created is inserted below:
**********************************
<?xml version="1.0" encoding="utf-16"?>
<definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:
soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.
org/2001/XMLSchema" xmlns:s0="http://www.e2efactory.com/BlueCom" xmlns:
soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http:
//www.e2efactory.com/Login" xmlns:tm="http://microsoft.
com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.
org/wsdl/mime/" targetNamespace="http://www.e2efactory.com/Login"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<s:schema elementFormDefault="qualified" targetNamespace="http:
//www.e2efactory.com/BlueCom">
<s:complexType name="MyNewCmdResponse" />
<s:complexType name="MyNewCmd" />
</s:schema>
</types>
<message name="MyNewCmdSoapIn" />
<message name="MyNewCmdSoapOut" />
<portType name="SOAPport">
<operation name="MyNewCmd">
<input message="tns:MyNewCmdSoapIn" />
<output message="tns:MyNewCmdSoapOut" />
</operation>
</portType>
<binding name="bindingName" type="tns:SOAPport">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="rpc" />
<operation name="MyNewCmd">
<soap:operation soapAction="" style="rpc" />
<input>
<soap:body use="encoded" namespace="http://www.e2efactory.
com/BlueCom" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
/>
</input>
<output>
<soap:body use="encoded" namespace="http://www.e2efactory.
com/BlueCom" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
/>
</output>
</operation>
</binding>
<service name="MyService">
<port name="MyPort" binding="tns:bindingName">
<soap:address location="http:
//localhost/webapp/wcs/stores/rpcrouter" />
</port>
</service>
</definitions>
****************************************
*******
The webservice_template.xml file looks like this:
****************************************
****
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE ECTemplate SYSTEM 'ec_template.dtd' >
<ECTemplate>
<TemplateDocument>
<DocumentType version='1.0'>http://www.e2efactory.
com/BlueCom</DocumentType>
<StartElement>q1:MyNewCmd</StartElement>
<TemplateTagName>MyNewCmd10Map</TemplateTagName>
<CommandMapping>
<Command CommandName='MyNewCmd'>
<Constant Field='protocolName'>SOAP</Constant>
<Constant Field='protocolVersion'>1.1</Constant>
</Command>
</CommandMapping>
</TemplateDocument>
<TemplateTag name='MyNewCmd10Map'>
</TemplateTag>
</ECTemplate>
****************************************
********
How do I make this work??! What is the reason for the error message
that I see?
What is the <DocumentType> tag in webservice_template.xml and what does
it do? - From my understanding this tag is used for raw XML over HTTP
messages that needs to be validated against a DTD, but this is a SOAP call
that itself contains the schema.
Any input most appreciated!
Regards,
Jacob
|