You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Glen Mazza <gl...@gmail.com> on 2010/07/02 00:17:57 UTC
Re: Help Beginner Access Service Methods
Make sure your framework is correct for creating a SOAP client first (Ant or
Maven, if you can use the latter, great):
http://www.jroller.com/gmazza/entry/soap_client_tutorial
(In Step #6 at the link above, check the ENDPOINT_ADDRESS_PROPERTY, that
will help you change the endpoint URL if you need to.)
To find out what's going out over the wire, Wireshark can help:
http://www.jroller.com/gmazza/entry/soap_calls_over_wireshark
Worst case, you can debug your SOAP client with Eclipse as follows:
http://www.jroller.com/gmazza/entry/eclipse_debug_web_services
The holder issue I'm less certain on, you may be able to turn on/off its
appearance by using "enableWrapperStyle" -- search for that term on this
page for more info: http://cxf.apache.org/docs/wsdl-to-java.html
Finally, switching between Metro and CXF, especially if you're using Maven,
is very simple--see the link I gave at the top for more info--you may wish
to try Metro to see if you get a different error message to determine the
problem.
HTH,
Glen
Rich-93 wrote:
>
> Hi,
>
> I've been "using" Axis2 to run a soap service for a webapp in my
> company. I use quotation marks around using because Axis2 is being very
> fickle and at the moment none of us can figure out how to get it to
> respond to soap requests after we made a patch to our code. Anyway, I
> decided maybe Axis2 is too much of a hassle for what is otherwise a
> small and simple part of our overall webapp.
>
> I've been trying to transfer over to CXF, and at this point I want to
> make sure I can get a reasonable SOAP response before I even bother
> implementing another SOAP service again. Our service is created
> wsdl-first, and I used wsdl2java from CXF to generate the java code. I
> then wrote up a simple implementation of the service class that
> shouldn't do much other than return a couple values.
>
> The issue I'm having is making a request to any of these methods. I'm
> just running the generated SOAP_server java class at this point. The
> address is bound as such, String address = "http://localhost:8081/";
> I am able to access my wsdl via http://localhost:8081/mloyalty?wsdl, but
> when I send valid requests to http://localhost:8081/mloyalty I get a
> fault back and the logger reports:
>
> WARNING: Interceptor for
> {http://mloyalty.moremagic.com/}MloyaltyImplService#{http://mloyalty.moremagic.com/}MagicPoint
> has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault
>
> From what I was able to dig up in searches, this type of exception most
> likely means I have the wrong endpoint URL for the request. Can anyone
> help me here?
>
> Also, I initially ran into issues with the Holder class
> IllegalAccessError related to Const. This seems to be a typical problem,
> and I included the CXF lib jars in the classpath to solve it. I'm not
> sure the exact jar that solved this though, if anyone knows the exact
> jar that fixes this I'd like to simplify the classpath down to just the
> necessities. One more question related to the Holder... in Axis2 the
> service methods had return types that were Response objects. I noticed
> CXF made the methods void, however it made method parameters for the
> output fields of the response all of type Holder, are these somehow
> passed by reference across the network so a client can read the values,
> or how exactly is that supposed to work?
>
> Thanks,
> Rich
>
--
View this message in context: http://old.nabble.com/Help-Beginner-Access-Service-Methods-tp29037905p29050192.html
Sent from the cxf-user mailing list archive at Nabble.com.