axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Jordahl <t...@macromedia.com>
Subject RE: Interesting TAG -> Code Questions
Date Fri, 28 Jun 2002 20:14:43 GMT

Look for this section in the *Stub.java file, my comments are prefix by // Tomj
        call.setUseSOAPAction(true);
        call.setSOAPActionURI("");
// Tomj - these make it use='literal'
        call.setEncodingStyle(null);
        call.setScopedProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
        call.setScopedProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
// Tom - This is the style
        call.setOperationStyle("wrapped");

--
Tom Jordahl
Macromedia



-----Original Message-----
From: Mick Robinson [mailto:mrobinson@mapcloud.com]
Sent: Thursday, June 27, 2002 3:03 PM
To: axis-user@xml.apache.org
Subject: RE: Interesting TAG -> Code Questions


Tom,

Thanks for the help, and sorry I didn't originally give Jrun's
webservice taglib the credit it deserved! You did a wicked job on that
one! Dropped the learning curve way down!.

Anyways, just one more thing, I wanted to try.. You suggested for the
.NET web services problem I was having that I add the style= attribute
to "wrapped" and the use= attribute to "literal" in the tag.

Since I have the it already written out in code, what would be the code
equivalent of those tag attributes? I did the WSDL2Java, but it was a
little much at first as I work up this learning curve.. I think once you
point it out, it will be clear as day..

Thanks again,
Mick



-----Original Message-----
From: Tom Jordahl [mailto:tomj@macromedia.com] 
Sent: Thursday, June 27, 2002 11:32 AM
To: 'axis-user@xml.apache.org'
Subject: RE: Interesting TAG -> Code Questions

Hi Mick,

First, let me just point out that the webservice tag you are using is a
feature of JRun, not part of Axis.  I am glad you are having success
with the tag, since I wrote it.

Anyway, to answer your Axis coding questions

1. You need to register a type mapping. You need the following call:

 call.registerTypeMapping(
  com.themindelectric.www.LocationInfo.class,
  new QName(
   "http://www.themindelectric.com/package/com.esri.is.services.common/"
   "LocationInfo"),
  org.apache.axis.encoding.ser.BeanSerializerFactory.class,
  org.apache.axis.encoding.ser.BeanDeserializerFactory.class);

2. You need to set a SoapAction in the tag (use soapaction="") or in the
  Call:
  call.setUseSOAPAction(true);
  call.setSOAPActionURI("action here");

For .NET, you will probably need to set the style= attribute when using
the tag to "wrapped" and the use= attribute to "literal".

A really good way to figure out what Axis client code is needed is to
run the WSDL2Java tool on the WSDL for the service you are trying to
access, then examining the Stub code that is generated.


--
Tom Jordahl
Macromedia




-----Original Message-----
From: Mick Robinson [mailto:mrobinson@mapcloud.com]
Sent: Thursday, June 27, 2002 2:05 PM
To: axis-user@xml.apache.org
Subject: Interesting TAG -> Code Questions



Hello, I'm Mick, I'm new to the list, and it's a pleasure meeting
everyone, I see big things happening between all of us! :)

Ok lets get to the point. I got 2 things.

First, I've been very successful consuming web services in JSP with the
use of the webservice taglib. What I need to do now is consume using
straight code.  This is what I got so far:
------------------------
If this is the taglib:
------------------------
<web:invoke
url="http://www.geographynetwork.com/services/v1/PlaceFinder"
namespace="http://www.geographynetwork.com/PlaceFinder"
operation="findPlace"
resultType="LocationInfo"
result="myResult"
scope="page">
<web:param name="arg0" value="Paris"/>
</web:invoke>

<% locationInfo = (LocationInfo)pageContext.getAttribute("myResult",
pageContext.PAGE_SCOPE); %>

------------------------
Then this is the code I've come up with so far, please let me know if
I'm missing anything:
------------------------
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new
java.net.URL("http://www.geographynetwork.com/services/v1/PlaceFinder"))
;
call.setOperationName(new
QName("http://www.geographynetwork.com/PlaceFinder","findPlace"));

locationInfo = (LocationInfo) call.invoke( new Object[] { "Paris" } );

------------------------
Now that code doesn't work, because I'm missing a key ingredient, my
MAIN question, is what is the code equivalent of the following tag (the
key ingredient:)):
------------------------
<web:beanmapping class="com.themindelectric.www.LocationInfo"
namespace="http://www.themindelectric.com/package/com.esri.is.services.c
ommon/" type="LocationInfo"/>

------------------------

I hope someone can help me out with that, or point in the right
direction, I couldn't find anything about that for code.

My Second thing is, I have never been able to consume a service written
in .NET, no matter what the service, or what it returns, I always get a
"500 Server did not recognize the value of HTTP Header SOAPAction:"
error? Anyone know what I got to do to consume to a .NET web service?

Thanks in advance!
Mick

_________________________
Mick Robinson
MapCloud Services Inc
1200-1185 West Georgia St
Vancouver B.C.
604-895-7611 (P)
604-682-3497 (F)








Mime
View raw message