Sam Bom

Greenhorn
+ Follow
since Jan 24, 2003
Merit badge: grant badges
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sam Bom

Thanks for your help.
18 years ago
Hi I am new to struts.. I want to populate a combobox with some master data.
using struts <html-select>
any pointers?
18 years ago
Did you guys check Web Service Studio..It isn't bad either..but it needs .NET Framework ..which you would need anyways if you have a .NET client.
http://www.gotdotnet.com/team/tools/web_svc/default.aspx
19 years ago
You are right...Thanks..
19 years ago
I am trying to invoke a web-service that returns a String to my Java Client..
Here's the code snippet..
String endpoint = "http://workstation-12:7001/axis/wsdl/DbWebService.wsdl";
Service service = new Service();
Call call = (Call) service.createCall();
call.setOperationStyle(org.apache.axis.enum.Style.WRAPPED);
call.setOperationUse(org.apache.axis.enum.Use.LITERAL);
call.setTargetEndpointAddress(new java.net.URL(endpoint));
call.setOperationName(new QName("http://dbwebservice","getStockPrice"));
call.addParameter(new javax.xml.namespace.QName("http://dbwebservice","ticker"), org.apache.axis.Constants.XSD_STRING, javax.xml.rpc.ParameterMode.IN);
call.setReturnType(org.apache.axis.Constants.XSD_STRING);
String ret = (String) call.invoke(new Object[]{ticker});
out.println(ret);
Here's the genarated wsdl which invokes the method OKAY when tried from other clients like .NET
<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions targetNamespace="http://workstation-12:7001/axis/services/DbWebService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://workstation-12:7001/axis/services/DbWebService" xmlns:intf="http://workstation-12:7001/axis/services/DbWebService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <wsdl:message name="getStockPriceRequest">
<wsdl:part name="in0" type="xsd:string" />
</wsdl:message>
- <wsdl:message name="getStockPriceResponse">
<wsdl:part name="getStockPriceReturn" type="xsd:string" />
</wsdl:message>
- <wsdl:portType name="TestDbWebService">
- <wsdl:operation name="getStockPrice" parameterOrder="in0">
<wsdl:input message="intf:getStockPriceRequest" name="getStockPriceRequest" />
<wsdl:output message="intf:getStockPriceResponse" name="getStockPriceResponse" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="DbWebServiceSoapBinding" type="intf:TestDbWebService">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="getStockPrice">
<wsdlsoap:operation soapAction="" />
- <wsdl:input name="getStockPriceRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://dbwebservice" use="encoded" />
</wsdl:input>
- <wsdl:output name="getStockPriceResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://workstation-12:7001/axis/services/DbWebService" use="encoded" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="TestDbWebServiceService">
- <wsdl:port binding="intf:DbWebServiceSoapBinding" name="DbWebService">
<wsdlsoap:address location="http://workstation-12:7001/axis/services/DbWebService" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

But with the above java client I'm getting the following error stack....
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXException: Bad envelope tag: definitions
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace: org.xml.sax.SAXException: Bad envelope tag: definitions
at org.apache.axis.message.EnvelopeBuilder.startElement(EnvelopeBuilder.java:109)
Where I am going wrong here... I think in my client this exception is generated when I am setting the Operation Names and Params --
call.setOperationName(new QName("http://dbwebservice","getStockPrice"));
call.addParameter(new javax.xml.namespace.QName("http://dbwebservice","ticker"),
any ideas??
Sam
19 years ago
You would need to specify your bean serializers(QName) in your axis client..
Please refer
http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-axis/java/docs/user-guide.html#ConsumingServices
for more info..
19 years ago
Is the Web Service up and running at http://www.informavores.com/services/FireflyDesignSubmissionSoap?WSDL
I tried the url...gives a blank page...
19 years ago
I also had the same problem with my WebLogic6.1
Please let me know if u find out the solution...
19 years ago
If you are using Axis implementataion on your WebLogic then the Axis will take care of wsdl generation and rest of the other stuff...not sure how WebLogic handles it independent of Axis..
19 years ago
If you are using Apache's Axis Implementation for SOAP and Web Services this link might be of help
http://ws.apache.org/axis/index.html Check the userguide link therein...
And though it mentions about Tomcat App Server..it's not much different that WebLogic6.1 sp4..
19 years ago
Ya Coneverting to Arrays is a good option,but I'm dealing with an existing application and the client is reluctant to change the method signatures snd definitions.
19 years ago
Hi Ramesh This is my generated wsdl
<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://workstation-12:8080/axis/services/AddFunction1Service" xmlns:intf="http://workstation-12:8080/axis/services/AddFunction1Service" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="urn:BeanService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://workstation-12:8080/axis/services/AddFunction1Service">
<wsdl:types>
<schema targetNamespace="urn:BeanService" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="ArrayList">
<sequence>
<complexContent>
<extension base="soapenc:Array">
</extension>
</complexContent>
</sequence>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="searchUsersResponse">
<wsdl:part name="searchUsersReturn" type="tns1:ArrayList"/>
</wsdl:message>
<wsdl:message name="searchUsersRequest">
<wsdl:part name="in0" type="xsd:string"/>
<wsdl:part name="in1" type="xsd:string"/>
</wsdl:message>
<wsdl:portType name="AddFunction1">
<wsdl:operation name="searchUsers" parameterOrder="in0 in1">
<wsdl:input name="searchUsersRequest" message="impl:searchUsersRequest"/>
<wsdl:output name="searchUsersResponse" message="impl:searchUsersResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="AddFunction1ServiceSoapBinding" type="impl:AddFunction1">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="searchUsers">
<wsdlsoap:operation/>
<wsdl:input>
<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://DefaultNamespace"/>
</wsdl:input>
<wsdl:output>
<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://workstation-12:8080/axis/services/AddFunction1Service"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="AddFunction1Service">
<wsdl:port name="AddFunction1Service" binding="impl:AddFunction1ServiceSoapBinding">
<wsdlsoap:address location="http://workstation-12:8080/axis/services/AddFunction1Service"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
19 years ago
I have a scenario ..if someone
could help me here...
Following is the class method I'm using which returns an ArrayList which I want to receive in my .Net setup.
public class AddFunction1 {
public AddFunction1(){}
public ArrayList searchUsers(String lastName, String firstName)
{
ArrayList myList = new ArrayList();
if(lastName.equals("last") && firstName.equals("first"))
myList.add(0, "mg1");
else
myList.add(0, "mg2");
return myList;
}
}
This is how my deploy.wsdd looks like which deploys the webservice okay in my AxisRc2 (in which some fixes have been done for the ArrayLists)
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="AddFunction1Service" provider="java:RPC">
<parameter name="className" value="AddFunction1"/>
<parameter name="allowedMethods" value="*"/>
<beanMapping qname="myNS:ArrayList" xmlns:myNS="urn:BeanService"
languageSpecificType="java:java.util.ArrayList"/>
</service>
<transport name="http">
<requestFlow>
<handler type="URLMapper"/>
<handler type="java rg.apache.axis.handlers.http.HTTPAuthHandler"/>
</requestFlow>
</transport>
<transport name="local">
<responseFlow>
<handler type="java rg.apache.axis.transport.local.LocalResponder"/>
</responseFlow>
</transport>
</deployment>
But I've not been able to get this inside my .Net client(Web Service Toolkit).Althogh I can see the proxy stubs and skeletons generated in .Net
and also the ArrayList object which is not null but still it doesn't show the correct data within it..
Has someone encountered such problem?
thanks
Sam.
19 years ago
Hi folks
I've a method which returns an ArrayList in my Axis rc2 installed on Tomcat..
I want to get this ArrayList within the .net env.. thru the Axis generated wsdl.
How should I write my deploy.wsdd in order to make it work?
For instance .
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="AddFunction1Service" provider="java:RPC">
<parameter name="className" value="AddFunction1"/>
<parameter name="allowedMethods" value="*"/>
<beanMapping qname="??" xmlns:myNS="??"-- what shud go in here?
languageSpecificType="java:java.util.ArrayList"/> ??
</service>
</deployment>
_Sameer
19 years ago
I have a set of classes which return Arraylists , Maps and Vectors.. Can I use them into the .Net Frontend. I have a Axis 1.1 beta installed on WebLogic6.1
19 years ago