RE: WSIF and Document/Literal Service

"Jackson, Douglas" <[email protected]> Mon, 19 Feb 2007 14:04:48 -0500
Newsgroups gmane.comp.apache.webservices.wsif.user
Message-ID <0419C2808E620348A3119DCCE2A7A69502EB7404@USCIMPLM004.net.plm.eds.com>
You need to make sure that there is a type mapping entry for the
java class/xml namespace in your server-config.wsdd or
client-config.wsdd
file.  Alternatively, you can declare them via WSIF in:

WSIFMessage opContext = operation.getContext();
opContext.setObjectPart(WSIFAXISConstants.CONTEXT_SOAP_TYPE_SERIALIZERS,
typeSerializers);

SimpleDeserializer works for simple types like string, int, Boolean,
etc.

-Doug.

-----Original Message-----
From: Aleksander Slominski [mailto:[email protected]] 
Sent: Thursday, February 08, 2007 9:43 AM
To: [email protected]
Subject: Re: WSIF and Document/Literal Service

[email protected] wrote:
> Hi Alek,
>
> For a document/literal(wrapped) style service, when we set a custom
java
> object as input in WSIFMessage,
> It is going through fine.
>
> But for document/literal(non-wrapped) style service, when we set a
> custom java object as input in WSIFMessage,
> We are encountering the following exception
>
> org.apache.wsif.WSIFException: exception on AXIS invoke:  
> org.xml.sax.SAXException: SimpleDeserializer encountered a child
> element, which is NOT expected, in something it was trying to
> deserialize.; nested exception is:
>      org.xml.sax.SAXException: SimpleDeserializer encountered a child
> element, which is NOT expected, in something it was trying to
> deserialize.
>      at
>
org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis.invok
> eAXISDocStyle(WSIFOperation_ApacheAxis.java:1764)
>      at
>
org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis.invok
> eRequestResponseOperation(WSIFOperation_ApacheAxis.java:1464)
>      at
>
org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis.execu
> teRequestResponseOperation(WSIFOperation_ApacheAxis.java:1035)
>
> Can we set a custome java object as input or should we set a XML
element
> instead? 
>
> Can you pls let us know, if there is any difference in setting
> parameters for wrapped and non-wrapped document/literal style
services.
>
> Regards
>   

hi Prakash,

i did not write that part of WSIF code and it is surprisingly complex
but exception happens inside AXIS when it is invoked by WSIF - from
WSIFOperation_ApacheAxis.java

        call.setProperty(Call.SEND_TYPE_ATTR, Boolean.FALSE);
        call.setProperty(AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
        
        call.setOperationStyle(operationStyle);
        //TODO???        call.setOperationUse("literal");
        setCallParameterNames(call);
        
        Object[] inputValues = getInputMessageValues(inMsg, null);
        addUnreferencedAttachments(call);
        

       try {
            response = call.invoke(inputValues);
            respOK = true;
        } catch (RemoteException ex) {
            Trc.exception(ex);
            throw new WSIFException( // line 1764
                "exception on AXIS invoke: " + ex.getLocalizedMessage(),
                ex);
        }


so i would send the question to AXIS mailing list (and check mailing
list archives) - maybe somebody knows solution ot it already.

thanks,

alek
>
>
> -----Original Message-----
> From: Aleksander Slominski [mailto:[email protected]] 
> Sent: Wednesday, February 07, 2007 6:57 PM
> To: [email protected]
> Subject: Re: WSIF and Document/Literal Service
>
> [email protected] wrote:
>   
>> Hi,
>>  
>> Can anyone let me know how to set input parameters for a 
>> document/literal service which takes a Complex type object as
>>     
> parameter?
> hi Prakash,
>
> what do you mean exactly by complex type object? ws it XML (DOM)? or
is
> it something generated by XML-Java binding tool out of XML Schema? or
> something else?
>
> best,
>
> alek
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
> The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of the
addressee(s) and may contain proprietary, confidential or privileged
information. If you are not the intended recipient, you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately and destroy all copies of this message and any attachments. 
>
> WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.
>  
> www.wipro.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>   


-- 
The best way to predict the future is to invent it - Alan Kay


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]