Hello,
I am trying to write a simple web service client for this web service:
WSDL: http://xi.esworkplace.sap.com:50200/ClassificationService/CS?wsdl
Endpoint: http://xi.esworkplace.sap.com:50200/ClassificationService/CS?style=document
When calling the operation getAllClassificationSystems(1, 1, 1, 1) I get the following error:
An error occurred invoking the specified method.
; nested exception is:
org.xml.sax.SAXException: Invalid element in api_v1.classification.sap.com.ClassificationSystemList - actualCount
I tested the web service with JCows Generic Web Service Client (http://www.jcows.org/?page=4〈=de). I also get a similar error when using the Web Service Client Wizard of WebSphere Integration Developer.
As I can see with TCPmonitor, from the endpoint I receive a meaningful SOAP response like this one:
SOAP response:
<SOAP-ENV:Envelope xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity- secext-1.0.xsd">
<wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-u tility-1.0.xsd">
<wsu:Created>2007-05-16T13:10:10Z</wsu:Created>
<wsu:Expires>2007-05-16T13:10:40Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:ClassificationSystemList version="10736" xmlns:rn0="http://schemas.xmlsoap.org/soap/encoding/" xmlns:rn1="java:sap/standard" xmlns:rn2="urn:uddi-org:vscache_v3" xmlns:rn3="urn:java/lang" xmlns:rn5="urn:uddi-org:api_v3" xmlns:rn4="urn:com.sap.classification.transport" xmlns:ns1="urn:com.sap.classification:api_v1">
<ns1:listDesc>
<ns1:actualCount>9</ns1:actualCount>
<ns1:includedCount>1</ns1:includedCount>
<ns1:listHead>1</ns1:listHead>
</ns1:listDesc>
<ns1:ClassificationSystem valuesVersion="12">
<ns1:id>uddi:uddi.sap.com:categorization:business-object</ns1:id>
<ns1:name>Business object</ns1:name>
<ns1:description>The SAP business object UDDI category system and SR classification system. Business objects are part of the Enterprise Service Architecture meta-model.</ns1:description>
<ns1:type>FLAT</ns1:type>
<ns1:isPredifined>true</ns1:isPredifined>
<ns1:readOnly>false</ns1:readOnly>
<ns1:onlyOnce>false</ns1:onlyOnce>
<ns1:mustHaveDesc>false</ns1:mustHaveDesc>
<ns1:normalizeCodes>false</ns1:normalizeCodes>
<ns1:mTimeCustModService>true</ns1:mTimeCustModService>
<ns1:mTimeSapModService>true</ns1:mTimeSapModService>
<ns1:ideCusModService>true</ns1:ideCusModService>
<ns1:ideCustPrgService>true</ns1:ideCustPrgService>
<ns1:ideSapModService>true</ns1:ideSapModService>
<ns1:ideSapPrgService>true</ns1:ideSapPrgService>
</ns1:ClassificationSystem>
</ns1:ClassificationSystemList>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
This is how the submitted SOAP request looks like:
SOAP request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<getAllClassificationSystems xmlns="urn:com.sap.classification:api_v1">
<listHead xsi:type="xsd:int">1</listHead>
<maxRows xsi:type="xsd:int">1</maxRows>
<version xsi:type="xsd:long">1</version>
<sortType xsi:type="xsd:int">1</sortType>
</getAllClassificationSystems>
</soapenv:Body>
</soapenv:Envelope>
But the problem is meet when the client tries to deserialize the received SOAP response. The error message in WID looks like this:
Error message:
WebServicesFault
faultCode: hxxp://schemas.xmlsoap.org/soap/envelope/ Server.generalException
faultString: org.xml.sax.SAXException: WSWS3047E: Error: Cannot deserialize element actualCount of bean classification.api_v1.sap.com.ClassificationSystemList_Type.
Child element actualCount does not belong in namespace urn:com.sap.classification:api_v1.
Most likely, a third-party web services platform has sent an incorrect SOAP message.
faultActor: null
faultDetail:
org.xml.sax.SAXException: WSWS3047E: Error: Cannot deserialize element actualCount of bean classification.api_v1.sap.com.ClassificationSystemList_Type.
Child element actualCount does not belong in namespace urn:com.sap.classification:api_v1.
Most likely, a third-party web services platform has sent an incorrect SOAP message.
at com.ibm.ws.webservices.engine.WebServicesFault.makeFault(WebServicesFault.java: 203)
at com.ibm.ws.webservices.engine.SOAPPart._getSOAPEnvelope(SOAPPart.java:1055)
at com.ibm.ws.webservices.engine.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:605)
at com.ibm.ws.webservices.engine.Message.getSOAPEnvelope(Message.java:461)
at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCSOAPHandler.checkSOAPSemant ics(JAXRPCSOAPHandler.java:298)
at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCSOAPHandler.access$000(JAXR PCSOAPHandler.java:75)
at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCSOAPHandler$2.invoke(JAXRPC SOAPHandler.java:173)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.ja va:329)
at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:2 83)
at com.ibm.ws.webservices.engine.client.Connection.invokeEngine(Connection.java:79 8)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:693)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:644)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:472)
at com.ibm.ws.webservices.engine.client.Stub$Invoke.invoke(Stub.java:818)
at ClassificationServiceWsd.CSBindingStub.getAllClassificationSystems(CSBindingStu b.java:127)
at ClassificationServiceWsd.ClassificationServiceViProxy.getAllClassificationSyste ms(ClassificationServiceViProxy.java:64)
at temp.CsReader3.main(CsReader3.java:42)
Caused by: org.xml.sax.SAXException: WSWS3047E: Error: Cannot deserialize element actualCount of bean classification.api_v1.sap.com.ClassificationSystemList_Type.
Child element actualCount does not belong in namespace urn:com.sap.classification:api_v1.
Most likely, a third-party web services platform has sent an incorrect SOAP message.
at com.ibm.ws.webservices.engine.encoding.ser.BeanDeserializer.onStartChild(BeanDe serializer.java:359)
at com.ibm.ws.webservices.engine.events.DEventProcessor.onSimpleChild(DEventProces sor.java:240)
at com.ibm.ws.webservices.engine.encoding.ser.BeanDeserializer.onSimpleChild(BeanD eserializer.java:576)
at com.ibm.ws.webservices.engine.events.P2DConverter.flush(P2DConverter.java:767)< br> at com.ibm.ws.webservices.engine.events.P2DConverter.endElement(P2DConverter.java: 410)
at sax.SAX2DocumentEntityParserBase.endElementAction(Unknown Source)
at util.DocumentEntityParserBase.endElementEvent(Unknown Source)
at com.ibm.xml.b2b.scan.latin.LatinWFCDocumentScanner.scanEndElement(Unknown Source)
at com.ibm.xml.b2b.scan.latin.LatinWFCDocumentScanner.scanContent(Unknown Source)
at com.ibm.xml.b2b.scan.latin.LatinWFCDocumentScanner.scanDocument(Unknown Source)
at sax.latin.LatinWFCSAX2DocumentEntityParser.scanDocument(Unknown Source)
at util.DocumentEntityParserBase.parse(Unknown Source)
at sax.SAX2DocumentEntityParserBase.parseEntity(Unknown Source)
at sax.SAX2DocumentEntityParserBase.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at com.ibm.ws.webservices.engine.utils.WebServicesParser.parse(WebServicesParser.j ava:274)
at com.ibm.ws.webservices.engine.encoding.DeserializationContextImpl.parse(Deseria lizationContextImpl.java:268)
at com.ibm.ws.webservices.engine.SOAPPart._getSOAPEnvelope(SOAPPart.java:1029)
... 15 more
Are the generated proxies for the web service client erronous, and thus a problem with Axis WSDL2Java tooling exists?
Or is there a mismatch between WSDL and SOAP response concerning encoding style or namespaces, or other...
Thanks for some hints!