You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Simonenko, Anna" <An...@greenpoint.com> on 2007/08/07 00:14:45 UTC

Webservice call with HTTP response

 Hello:

Is there a way when client can send a soap message to a server and
expects a certain response, as defined in wsdl, but sometimes receives
and processes a simple HTTP post as response, unrelated to the
specifications from wsdl?
I hope my question is clear enough. We have  a virus scanning
intermediary proxy set up that will scan all our messages
(attachements)from client to the service. This intermediary sometimes
will send a HTTP POST to the client when it detects the virus. 

Thanks for any suggestions!!
Anna

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


How to get an array of object on client side

Posted by "Li, Weiye" <We...@STJUDE.ORG>.
Hello:

 

I'm new to Axis. I wrote a simple web service using Axis2 v1.3 to do the
database CRUD. On a request-response DII call my service will return an
array of object (JavaBean). I had trouble on this point. The code piece
is:

 

RPCServiceClient serviceClient = new RPCServiceClient();

Options options = serviceClient.getOptions();

EndpointReference targetEPR = new EndpointReference(SERVICE_EPR);

options.setTo(targetEPR);

 

QName opName = new QName(SCHEMA_NAME_SPACE, "getLocations");

Object[] opArgs = new Object[]{};

// here is the point of confusion

Class[] returnType = new Class[] {

      LocationBean.class

};          

Object[] response = serviceClient.invokeBlocking(opName, opArgs,
returnType);

 

Since the "getLocations" return an array of LocationBean, I don't know
how to set the returnType, The code above can only get first element in
the array. i.e.., response array has only one element. Closely monitor
the SOAP response message turned out all elements in that array was
included in SOAP.

 

If I set returnType this way:

Class[] returnType = new Class[] {

      LocationBean.class, LocationBean.class

};

The response array will have two return objects. However it is not the
way it should be: how can I know the # of objects to return? And if the
service returns 100 object, I need to repeat LocationBean.class 100
times!

 

Anyone can help? Thanks a lot

 

Will

 


Re: Webservice call with HTTP response

Posted by keith chapman <ke...@gmail.com>.
If you are using Axis 1.2 or above and if the content-type of the post
message is application/xml then the client will be able to read the post
response.

Thanks,
Keith.

On 8/7/07, Simonenko, Anna <An...@greenpoint.com> wrote:
>
> Hello:
>
> Is there a way when client can send a soap message to a server and
> expects a certain response, as defined in wsdl, but sometimes receives
> and processes a simple HTTP post as response, unrelated to the
> specifications from wsdl?
> I hope my question is clear enough. We have  a virus scanning
> intermediary proxy set up that will scan all our messages
> (attachements)from client to the service. This intermediary sometimes
> will send a HTTP POST to the client when it detects the virus.
>
> Thanks for any suggestions!!
> Anna
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/