This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I have a wsdl that I just want to send a 2 parameters(invoiceID and invoiceNumber). When I use the WSDLtoJava tool, it generates the java fine. When I view the service in Axis, it gives me a ton of methods. Looks like: I should just say getPurchaseOrder. See my WSDL below. Please help...
PurchaseOrder (wsdl) getPurchaseOrderAddress getPurchaseOrder getPurchaseOrder getPort getPort etc.
I meant to say in my post.. I want it to just say getPurchaseOrder instead of all the other methods. What I am doing wrong because I get all those other methods when I access my webservices in AXIS?
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35444
9
posted
0
The methods that are exposed as WS are specified in the deployment descriptor. You should be able simply to remove the corresponding <operation> elements in your WSDD file, and then, after the next deployment, they should no longer be in the WSDL.
Matt Hoffman
Ranch Hand
Joined: Jun 03, 2004
Posts: 83
posted
0
OK. I fixed the WSDL and it does work and I can deploy it, but I can't get a SOAP response. I get: <faultstring>java.lang.InstantiationException: localhost.axis.services.PurchaseOrderService.PurchaseOrder</faultstring>
I also see this error in my XML:
SeverityDescriptionResourceIn FolderLocationCreation TimeId 2cvc-complex-type.2.4.a: Invalid content was found starting with element 'types'. One of '{"http://schemas.xmlsoap.org/wsdl/" ocumentation, WC[##other:"http://schemas.xmlsoap.org/wsdl/"], "http://schemas.xmlsoap.org/wsdl/":import, "http://schemas.xmlsoap.org/wsdl/":types, "http://schemas.xmlsoap.org/wsdl/":message, "http://schemas.xmlsoap.org/wsdl/" ortType, "http://schemas.xmlsoap.org/wsdl/":binding, "http://schemas.xmlsoap.org/wsdl/":service}' is expected. @see: http://www.w3.org/TR/xmlschema-1/#cvc-complex-typepurchaseOrder.wsdlaxisline 4November 5, 2005 4:47:55 PM1483
Can someone give me a idea of what might be wrong? Thanks
<wsdl:service name="PurchaseOrderService"> <wsdl :p ort binding="impl :p urchaseOrderSoapBinding" name="PurchaseOrder"> <wsdlsoap:address location="http://localhost:8080/axis/services/PurchaseOrderService"/> </wsdl :p ort> </wsdl:service> </wsdl efinitions> [ November 05, 2005: Message edited by: Matt Hoffman ]
Matt Hoffman
Ranch Hand
Joined: Jun 03, 2004
Posts: 83
posted
0
The reason for my previous error is that <types> should be <wsdl:types>. Now I am not sure how to invoke this and get a SOAP response. This is the request, but I get a java.lang.InstantiationException. What do I need to do to get a response?
How is this request created - did you put it together manually? (I ask because, not seeing the client code, and not knowing where the exception is thrown, I assume that the SOAP is incorrect, although there can be other reasons.). An API like SAAJ can help with only a few lines of code; this article shows how. [ November 06, 2005: Message edited by: Ulf Dittmer ]
Matt Hoffman
Ranch Hand
Joined: Jun 03, 2004
Posts: 83
posted
0
Thanks for the reply. I am getting the exception when sending the soap request. I guess this is my question. I am not using a DB or anyhing. I just need to send a request that sends a invoiceID and receives header and line item info for 1 invoice. I would be passing the invoiceID via a client in the command line and then getting a SOAP request and response. THis seems so simple, but I am getting this in the response. Any ideas you may have will be helpful on how to do a "static" request and response.