Brett Daburn

Greenhorn
+ Follow
since Nov 25, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Brett Daburn

Is it possible to view the SOAP xml request of a client call when using the generated classes of WebLogic 10 ClientGen? The toString of the objects will display it in their own format, but I need to obtain the actual SOAP xml of the request.
16 years ago
For some reason, FireFox 2 doesn't display the entire WSDL. You have to view the source.

<wsdl efinitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://services.printable.com/1.0/sso" xmlns:s1="http://www.printable.com/sso" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s2="http://www.printable.com/pti" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://services.printable.com/1.0/sso" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">

I will have to discuss with the 'big guys' on what to do about WebLogic clientgen and this WSDL. Thank you for your assistance!


P.S.
I also came across "the WebLogic
8.1 clientgen tool will not handle the xsd:choice keyword." and this WSDL contains a choice.
16 years ago
This below link is to the documentation I came across. I could almost follow their example, but my 'operation method' to return the result object is asking for a SOAPElement object as the parameter. That is what I am not following.


http://edocs.beasys.com/wls/docs81/webserv/client.html#1070561
16 years ago
I am trying to develop a web service client using code generated from weblogic 8.1. I am having trouble getting started in creating the request. (I was able to do it fine with Axis2, but we are unable to use Axis due to in-house standards and other issues.)

In the code, I am getting the stub class as follows:



What I'm not understanding is how to set up and send the request with the generated classes. The operation name is Authenticate. In order to get the Authenticate response, I am provided with the following.:



What I'm not following is parameters is a javax.xml.soap.SOAPElement object. I'm not familiar with SOAPElement, but it seams to me that it is wanting me to manually create the SOAP XML and send it as the parameter. Am I following this correctly? If so, why create all of the classes for all of the types in the WSDL? If not, how do I use the generated classes to create the request?

(The WSDL is https://services.pj1.staging.printable.com/TRANS/0.9/SSO.asmx?WSDL)
16 years ago
I am only doing the client side of the web service. This is the exception I get when I try to run it using the 2.0 jar. When I use the 3.1 jar, it is working fine, but am unable to use the 3.1 jar.

- Deploying module: metadataExchange - file:/C:/Documents and Settings/c02378/Desktop/axis2-1.4.1/lib/mex-1.4.1.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/httpclient/methods/RequestEntity
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:354)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at com.printable.services._1_0.sso_.SingleSignOnStub.Authenticate(SingleSignOnStub.java:467)
at com.printable.services._1_0.sso_.Test.main(Test.java:63)
16 years ago
Is there a version of Axis2 that uses commons-httpclient-2.0.jar instead of 3.1? We are using 2.0 and are unable to update at the time being. I already learned the Axis2 api and wrote some code, so I would hate to lose all of this and go to the weblogic generated stubs and api.
16 years ago
I just tried making a simple get request using the following code sample and got the same timeout exception. I will need to figure out what is wrong with my environment not allowing requests. Then I will look into the certificate issue. Thank you for your help!
16 years ago
Thanks for the info Peer. Does it look like this is the reason for the timeout? I mean, do you get a timeout exception when you don't have the certificate in your TrustStore? I changed it to not use https and am still getting the timeout when you can place the URL in the browser without the https and still get a response.
16 years ago
I really appreciate the help. I believe that I have it set up correctly and am sending the request correctly. However, I am getting a timeout. Is there anything special you need to do to send to https?


Start:
- Deploying module: metadataExchange - file:/C:/Documents and Settings/c02378/Desktop/axis2-1.4.1/lib/mex-1.4.1.jar
- I/O exception (java.net.ConnectException) caught when processing request: Connection timed out: connect
- Retrying request
- I/O exception (java.net.ConnectException) caught when processing request: Connection timed out: connect
- Retrying request
- I/O exception (java.net.ConnectException) caught when processing request: Connection timed out: connect
- Retrying request
- Unable to sendViaPost to url[https://services.pj1.staging.printable.com/TRANS/0.9/SSO.asmx]
java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:507)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:546)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:140)
at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:130)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at com.printable.services._1_0.sso.SingleSignOnStub.Authenticate(SingleSignOnStub.java:463)
at com.printable.services._1_0.sso.Test.main(Test.java:47)
org.apache.axis2.AxisFault: Connection timed out: connect
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at com.printable.services._1_0.sso.SingleSignOnStub.Authenticate(SingleSignOnStub.java:463)
at com.printable.services._1_0.sso.Test.main(Test.java:47)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:507)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:546)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:140)
at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:130)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189)
... 9 more
Done.





Here is my code:
16 years ago
I am developing a client for a web service that is already existing. I got axis2 and created the code form the WSDL2Java from the web service's WSDL. I set all of the objects but now do not know how to make the call to the service.

The documentation provided from the web service vendor is in ASP.NET, however, I'm using Java. I was able to follow their example up until instantiating the proxy for sending the request to the web service and calling it.

This is the ASP.NET code I can't follow:



How do I send out the request to get back the response URL in Java?






My Java code so far:
16 years ago