axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Fremantle" <pzf...@gmail.com>
Subject Fwd: Stubless Web Service Invocation
Date Mon, 26 Mar 2007 14:52:34 GMT
---------- Forwarded message ----------
From: Paul Fremantle <pzfreo@gmail.com>
Date: Mar 26, 2007 3:52 PM
Subject: Re: Stubless Web Service Invocation
To: jima@comware.com.au


Jim

It looks like its not getting the URL from the WSDL correctly. Can you
confirm there is a valid endpoint address in there? Maybe you could
post the WSDL (if its not confidential).

Paul




On 3/26/07, Jim Alateras <jima@comware.com.au> wrote:
> Paul,
>
> I managed to get a little bit down the trasck with your suggestion. Here
> is the code
>
> @Test
> public void testCreationofSOAPEnvelope() throws Exception {
>    SOAPFactory fac = OMAbstractFactory.getSOAP12Factory();
>    SOAPEnvelope env = fac.getDefaultEnvelope();
>    OMNamespace tns1 = fac.createOMNamespace(
>      "http://dlgpsr.qld.gov.au/smarteda/prototype/dap/200611", "tns1");
>    OMElement root = fac.createOMElement("StartTestRequestInfo", tns1);
>    root.setText("1");
>    env.getBody().addChild(root);
>
>    ServiceClient client = new ServiceClient(null, new
>      URL("file:src/main/wsdl/SimplePAProcess.wsdl"), null, null);
>
> client.getOptions().setAction("http://dlgpsr.qld.gov.au/eda/bpms/200611/SimplePAProcess/Client_To_SimplePAProcess/Client_To_SimplePAProcess_PortType/Start_Process");
> client.sendReceive(new QName("Start_Process"), env);
> }
>
> Unfortunaltely, when i run the code I get the following error
>
> java.lang.NullPointerException
>          at
> org.apache.axis2.description.ClientUtils.inferInTransport(ClientUtils.java:85)
>          at
> org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:163)
>          at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:579)
>          at
> com.comware.intalio.testing.TestSimplePAProcess.testCreationofSOAPEnvelope(TestSimplePAProcess.java:64)
>
>
> Am I not setting something correctly?
>
> cheers
> </jima>
> Paul Fremantle wrote:
> > Jim
> >
> > I'm assuming you know how to create the XML payload of the SOAP body,
> > and parse the response body.
> >
> > OMElement payload = ....;
> >
> > ServiceClient sc = new ServiceClient("url-to-service");
> > sc.setAction(SOAPAction);
> > OMElement response = sc.sendReceive(payload);
> >
> > You can also dynamically use the URL information and Actions etc from a
> > WSDL:
> >
> > ServiceClient sc = new ServiceClient(null, new URL(wsdlLocation),
> > null,null);
> > In this case you need to specify the operation you are calling:
> >
> > QName operation = new QName("submitPurchase");
> > response = sc.sendReceive(operation, payload);
> >
> > Paul
> >
> >
> >
> >
> > On 3/23/07, Jim Alateras <jima@comware.com.au> wrote:
> >> [resend with a more appropriate subject]
> >>
> >> I was wondering whether someone could tell me whether axis2 can support
> >> stubless (i.e. dynamic stubs) invocation of web services.
> >>
> >> If so can you pls point me to any resources\examples?
> >>
> >> cheers
> >> </jima>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: axis-user-help@ws.apache.org
> >>
> >>
> >
> >
>
>


--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com


-- 
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

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


Mime
View raw message