8 Replies Latest reply on Feb 15, 2005 3:07 PM by Thomas Diesler

    web service client deserialization

    Andrew Wagg Newbie

      Has anyone seen any problems with the deserialization code generated by wscompile for complex types. I have put trace into the deserialization and my problem seems the be the element name from the XML does not match the name expected by the code and so the message is not decoded.

      The deserialization is looking for a QNAME of


      but the element name from the XML reader is


      Am I missing some option somewhere.

      Any pointers greatly appreciatted.

        • 1. Re: web service client deserialization
          Thomas Diesler Master

          The key to this is, whether the element name should be quailfied or unqualified. Checkout your schema.

          • 2. Re: web service client deserialization
            Andrew Wagg Newbie

            This is a section of my wsdl,

            <?xml version="1.0" encoding="utf-8"?>
             COPYRIGHT (c) 2003 OPC Foundation. All rights reserved.
             Use subject to the OPC Foundation License Agreement found at the following URL:
            <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://opcfoundation.org/webservices/XMLDA/1.0/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://opcfoundation.org/webservices/XMLDA/1.0/" xmlns="http://schemas.xmlsoap.org/wsdl/">
             <s:schema elementFormDefault="qualified" targetNamespace="http://opcfoundation.org/webservices/XMLDA/1.0/">
             <s:element name="GetStatus">
             <s:attribute name="LocaleID" type="s:string" />
             <s:attribute name="ClientRequestHandle" type="s:string" />
             <s:element name="GetStatusResponse">
             <s:element minOccurs="0" maxOccurs="1" name="GetStatusResult" type="s0:ReplyBase" />
             <s:element minOccurs="0" maxOccurs="1" name="Status" type="s0:ServerStatus" />

            I assume looking at this that the elementFormDefault for the schema has specified qualified.

            Both the client and server side are being generated using wscompile.

            • 3. Re: web service client deserialization
              Thomas Diesler Master

              Could you please post the SOAP messages that are beeing exchanged to this forum. In order to see them you would enable DEBUG on the org.apache.axis category in log4j.xml.

              Yust to confirm. Your client is jwsdp, your server is jbossws?

              It seems that jbossws is defaulting to unqualified, if this is true we need to file a bug in jira.

              • 4. Re: web service client deserialization
                Andrew Wagg Newbie

                Client sends

                <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
                 <ns0:GetStatus LocaleID="en" ClientRequestHandle="Andy"/>

                Server replies

                 <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">
                 <ns1:GetStatusResponse xmlns:ns1="http://opcfoundation.org/webservices/XMLDA/1.0/">
                 <GetStatusResult ClientRequestHandle="Andy" RcvTime="2005-02-11T13:47:58.673Z" ReplyTime="2005-02-11T13:47:58.673Z" RevisedLocaleID="en" ServerState="running"/>
                 <Status ProductVersion="" StartTime="2005-02-11T13:47:58.673Z">

                The server is jbossws (server-side files generated by using wscompile from jwsdp) and the client is a standalone client using the files generated by wscompile from jwsdp.

                • 5. Re: web service client deserialization
                  Andrew Wagg Newbie

                  Just for interest, I took the qualified out of the wsdl. The test client and test server were then able to communicate successfully. Unfortunately, the wsdl is an external published interface so i cannot permenantly change it. So the problem does seem to be related to JBoss not providing a qualified name.


                  • 6. Re: web service client deserialization
                    Thomas Diesler Master

                    Andy, this is what I thought. The only chance you have is copy all type definitions from the gnerated *.wsdd to our propriatary ws4ee-deployment.xml desriptor and add the name prefix to all bean properties that should be qualified.

                    You are a victim of our Axis based implementation not beeing schema aware. Changing that would involve a conserable change to the Axis code that I consider dead already. Instead we are in the process of designing a new SOAP stack that will of course address this problem.

                    See the JBossWS roadmap for details.

                    • 7. Re: web service client deserialization
                      Andrew Wagg Newbie

                      Thans for your help Tom. Adding the namespace prefix to the xml name in the type mappings works. Its not very neat, but I already have to include the operations here to correct the return and parameters, so not to big a deal to add the type mappings as well.It's unlikely my external wsdl will change, so this will work as a solution for now.

                      I look forward to the JBoss solution.

                      Thanks again for your help with this, these forums are what helps to make JBoss so good.

                      Regards, Andy