Starting out with Java client for Web Services

Hi,
I'm new to Web Services (but not Java in general). Just looking for some pointers to get me started in the right direction.
My pressing need is to develop a Java client for a set of Web Services described through a WSDL.
I've found the "Chapter 12: Building Web Services With JAX-RPC" section of the Web Services Tutorial. Could someone just confirm that this is the right tutorial for me to read for my puropse.
Also I was wondering about available tools for this purpose.
I was expecting that there would be a tool that could read a WSDL and generate client side stubs for it automatically. (Like how you can take a Remote interface and rmic it in RMI). Is there such a thing? Is it possible?
Preferably an open source (free) tool. I use the Netbeans IDE so if anyone knows of anything that integrates with that, all the better. I had a look at their site but couldn't see anything.
Thanks in advance for any tips anyone can provide.

Hi,
I'm new to Web Services (but not Java in general).
Just looking for some pointers to get me started in
the right direction.
My pressing need is to develop a Java client for a set
of Web Services described through a WSDL.
I've found the "Chapter 12: Building Web Services
With JAX-RPC" section of the Web Services Tutorial.
Could someone just confirm that this is the right
tutorial for me to read for my puropse.Yes, that's right. It manages to say very little in very many pages.
Also I was wondering about available tools for this
purpose.
I was expecting that there would be a tool that could
read a WSDL and generate client side stubs for it
automatically. (Like how you can take a Remote
interface and rmic it in RMI). Is there such a thing?
Is it possible?This is exactly what the wscompile tool (distributed with the JWS SDK 1.3) does as one of its options. See http://java.sun.com/webservices/docs/1.1/tutorial/doc/JAXRPC6.html for more info.

Similar Messages

  • "Connection refused" when using Java client for Web Service

    I deployed a web service to Weblogic Server 7.0 running on Windows 2000. I can
    use IE browser to see its WSDL perfectly but when I run the Java client, the proxy
    method call generates the following error:
    java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
    at java.net.Socket.connect(Socket.java:426)
    at java.net.Socket.connect(Socket.java:376)
    at java.net.Socket.<init>(Socket.java:291)
    at java.net.Socket.<init>(Socket.java:119)
    at weblogic.webservice.binding.soap.HttpClientBinding.createSocket(HttpC
    lientBinding.java:412)
    at weblogic.webservice.binding.soap.HttpClientBinding.createSocket(HttpC
    lientBinding.java:390)
    at weblogic.webservice.binding.soap.HttpClientBinding.send(HttpClientBin
    ding.java:246)
    at weblogic.webservice.core.handler.ClientHandler.handleRequest(ClientHa
    ndler.java:34)
    at weblogic.webservice.core.HandlerChain.handleRequest(HandlerChain.java
    :131)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.jav
    a:417)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.jav
    a:359)
    at weblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:225)
    at weblogic.jws.proxies.CenterWSSoap_Stub.update(CenterWSSoap_Stub.java:
    181)
    at weblogic.jws.proxies.CenterWSSoap_Stub.update(CenterWSSoap_Stub.java:
    207)
    at CenterWSClient.main(CenterWSClient.java:73)
    javax.xml.rpc.JAXRPCException: Failed to send request:java.net.ConnectException:
    Connection refused: connect
    at weblogic.webservice.core.handler.ClientHandler.handleRequest(ClientHa
    ndler.java:37)
    at weblogic.webservice.core.HandlerChain.handleRequest(HandlerChain.java
    :131)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.jav
    a:417)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.jav
    a:359)
    at weblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:225)
    at weblogic.jws.proxies.CenterWSSoap_Stub.update(CenterWSSoap_Stub.java:
    181)
    at weblogic.jws.proxies.CenterWSSoap_Stub.update(CenterWSSoap_Stub.java:
    207)
    at CenterWSClient.main(CenterWSClient.java:73)
    Exception in handler's handleRequest().
    java.rmi.RemoteException: SOAP Fault:javax.xml.rpc.soap.SOAPFaultException: Conn
    ection refused: connect; nested exception is:
    javax.xml.rpc.soap.SOAPFaultException: Connection refused: connect
    at weblogic.jws.proxies.CenterWSSoap_Stub.update(CenterWSSoap_Stub.java:
    186)
    at weblogic.jws.proxies.CenterWSSoap_Stub.update(CenterWSSoap_Stub.java:
    207)
    at CenterWSClient.main(CenterWSClient.java:73)
    Caused by: javax.xml.rpc.soap.SOAPFaultException: Connection refused: connect
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.jav
    a:459)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.jav
    a:359)
    at weblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:225)
    at weblogic.jws.proxies.CenterWSSoap_Stub.update(CenterWSSoap_Stub.java:
    181)

    In your client program, when you do "new XXX_Impl(String wsdlurl)", did you
    pass in the wsdl you were hitting with browser?
    -Neal
    "Ray Yan" <[email protected]> wrote in message
    news:[email protected]...
    >
    I deployed a web service to Weblogic Server 7.0 running on Windows 2000. Ican
    use IE browser to see its WSDL perfectly but when I run the Java client,the proxy
    method call generates the following error:
    java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
    atjava.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
    at java.net.Socket.connect(Socket.java:426)
    at java.net.Socket.connect(Socket.java:376)
    at java.net.Socket.<init>(Socket.java:291)
    at java.net.Socket.<init>(Socket.java:119)
    atweblogic.webservice.binding.soap.HttpClientBinding.createSocket(HttpC
    lientBinding.java:412)
    atweblogic.webservice.binding.soap.HttpClientBinding.createSocket(HttpC
    lientBinding.java:390)
    atweblogic.webservice.binding.soap.HttpClientBinding.send(HttpClientBin
    ding.java:246)
    atweblogic.webservice.core.handler.ClientHandler.handleRequest(ClientHa
    ndler.java:34)
    atweblogic.webservice.core.HandlerChain.handleRequest(HandlerChain.java
    :131)
    atweblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.jav
    a:417)
    atweblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.jav
    a:359)
    atweblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:225)
    atweblogic.jws.proxies.CenterWSSoap_Stub.update(CenterWSSoap_Stub.java:
    181)
    atweblogic.jws.proxies.CenterWSSoap_Stub.update(CenterWSSoap_Stub.java:
    207)
    at CenterWSClient.main(CenterWSClient.java:73)
    javax.xml.rpc.JAXRPCException: Failed to sendrequest:java.net.ConnectException:
    Connection refused: connect
    atweblogic.webservice.core.handler.ClientHandler.handleRequest(ClientHa
    ndler.java:37)
    atweblogic.webservice.core.HandlerChain.handleRequest(HandlerChain.java
    :131)
    atweblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.jav
    a:417)
    atweblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.jav
    a:359)
    atweblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:225)
    atweblogic.jws.proxies.CenterWSSoap_Stub.update(CenterWSSoap_Stub.java:
    181)
    atweblogic.jws.proxies.CenterWSSoap_Stub.update(CenterWSSoap_Stub.java:
    207)
    at CenterWSClient.main(CenterWSClient.java:73)
    Exception in handler's handleRequest().
    java.rmi.RemoteException: SOAPFault:javax.xml.rpc.soap.SOAPFaultException: Conn
    ection refused: connect; nested exception is:
    javax.xml.rpc.soap.SOAPFaultException: Connection refused: connect
    atweblogic.jws.proxies.CenterWSSoap_Stub.update(CenterWSSoap_Stub.java:
    186)
    atweblogic.jws.proxies.CenterWSSoap_Stub.update(CenterWSSoap_Stub.java:
    207)
    at CenterWSClient.main(CenterWSClient.java:73)
    Caused by: javax.xml.rpc.soap.SOAPFaultException: Connection refused:connect
    atweblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.jav
    a:459)
    atweblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.jav
    a:359)
    atweblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:225)
    atweblogic.jws.proxies.CenterWSSoap_Stub.update(CenterWSSoap_Stub.java:
    181)

  • Just Starting out with java packages

    Hello,
    I'm a beginner and I'm starting out with java packages.
    I wrote two simple .java files, one test program and one containing a simple class.
    Both files are compiling without errors but When I run the program I get an error NoClassDeffoundError.
    I use the import <package> statement And I think I'm using the CLASSPATH variable correctly.
    SET CLASSPATH=d:\nopol
    path for the .java containing the test class is:
    d:\nopol\utilities \myapp.
    In the test file I use "import utilities.myapp.*.
    I would be very happy if anyone could help me
    Thanks beforehand
    Nopol.

    The test file should be in d:\nopol, if it's not a part of your package utilities.myapp. Everything should be compiled from d:\nopol, the test class with "javac ClassName.java" and the class in the package with "javac utilities/myapp/ClassName.java".
    Your classpath seems fine for now, though. But yes, do add the period there, otherwise you could run into problems later.

  • Java client for OSB service

    Hi All,
    We have to talk to OSB11g proxy service which is created as Any Soap service (url: http://myosb.firmname.com:7001/osb-ws)
    I have java client applications which need to consume this proxy service built on top of OSB by providing the necessary inputs.
    Typically we get wsdl url's and then we use Jdeveloper to create web service client proxies to generate client side web service artifacts and call the web service.
    But I am confused here as to how can I get a handle to the OSB service from a java client. The OSB developers on the project tell me they don't have and cannot provide a WSDL based URL.
    What are the general practices for consuming OSB proxy service from java client apps. Google search result did not yield much help.
    Please let me know your thoughts.
    Regards,

    Hi Anuj,
    Thanks for reply. As u guys mentioned that about the URL I have rechecked the URL and realized the port number which I was using that was Admin Server Port while environment contains two servers Admin and Managed both. I have change the Port Number from Admin to Managed now its hitting the Service but now another problem I start facing that I need to pass a big XML as input request to that OSB Proxy Service. I have two different code where I am attaching the input request in two different ways but none of them is passing that request to URL and in both cases I am getting default response from URL.
    Here is the Code, Code1 through Core Java:
    ===============================================================================================
    package retriggerpsftorder;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.net.URL;
    import java.net.URLConnection;
    import java.net.URLEncoder;
    public class MyTest {
    public MyTest() {
    System.out.println("Constructor executing");
    System.out.println("JAVA Version : " + System.getProperty("JAVA.VERSION"));
    public static void main(String arga[]) {
    try {
    // Construct data
    String data = URLEncoder.encode("key1", "UTF-8") + "=" + URLEncoder.encode("<migrateOrder>\n" +
    " <migrateOrderId>51c797d61dd211b2818a</migrateOrderId>\n" +
    " <createCustomer>false</createCustomer>\n" +
    " <createBillingAccount>false</createBillingAccount>\n" +
    " <Customer>\n" +
    " <ID>\n" +
    " </PIN>\n" +
    "     </customerAccountNumber\"></customerAccountNumber\">\n" +
    " </externalIdentifier>\n" +
    " </ID>\n" +
    " <creditClass>W</creditClass>\n" +
    " </Customer>\n" +
    " <Account>\n" +
    " <name>Gurwinder Singh</name>\n" +
    " <ID>\n" +
    " <PIN>1987</PIN>\n" +
    "     <billingAccountNumber>695909361</billingAccountNumber>\n" +
    " </ID>\n" +
    " </Account>\n" +
    " <CustomerOrder>\n" +
    " <customerOrderPartyReference>\n" +
    " <MSISDN>61425265789</MSISDN>\n" +
    " </customerOrderPartyReference>\n" +
    " <orderSource>\n" +
    " <templateName>AUP1057_AU10357_24_DATA_0113</templateName>\n" +
    " </orderSource>\n" +
    " <typeCode>Connect</typeCode>\n" +
    " <futureSubmitDate>2011-02-28</futureSubmitDate>\n" +
    " <cancelOpenOrdersIndicator>false</cancelOpenOrdersIndicator>\n" +
    " <lineItem actionCode=\"Add\" priorityRanking=\"1\">\n" +
    " <product ID=\"AUX221\" type=\"SAMID\" attributeCount=\"19\">\n" +
    " <attribute>\n" +
    " <name>Accept Code</name>\n" +
    " <value>Accept 5</value>\n" +
    " </attribute>\n" +
    " </product>\n" +
    " </lineItem>\n" +
    " <lineItem actionCode=\"Add\" priorityRanking=\"2\">\n" +
    " <product ID=\"OFF0018\" type=\"SAMID\" attributeCount=\"1\">\n" +
    " <attribute>\n" +
    " <name>Period Override</name>\n" +
    " <value>24</value>\n" +
    " </attribute>\n" +
    " </product>\n" +
    " </lineItem>\n" +
    " <lineItem actionCode=\"Allocate\" priorityRanking=\"3\">\n" +
    " <equipment ID=\"012645002053476\" type=\"Handset\" />\n" +
    " </lineItem>\n" +
    " <lineItem actionCode=\"Allocate\" priorityRanking=\"4\">\n" +
    " <resource ID=\"89610300000905636996\" type=\"SIM\" />\n" +
    " </lineItem>\n" +
    " <externalOrderReference>\n" +
    " <serviceID>75055433</serviceID>\n" +
    " <customerID>921092224696621123154029260421</customerID>\n" +
    " <serviceStartDate>2009-02-10</serviceStartDate>\n" +
    " <serviceRatePlan>X3Cap $29 24m($29min-35cFF)</serviceRatePlan>\n" +
    " <agreementNumber>VHU0029215</agreementNumber>\n" +
    " <accountNumber>3382437469</accountNumber>\n" +
    " <migrationType>Loyalty Handset Upgrade Acq</migrationType>\n" +
    " <receiveMarketingInfoOverrideIndicator>false</receiveMarketingInfoOverrideIndicator>\n" +
    " </externalOrderReference>\n" +
    " <orderSalesReference>\n" +
    " <dealerReferenceID>D3641</dealerReferenceID>\n" +
    " <trailingCommissionRatePlan>MUPR9</trailingCommissionRatePlan>\n" +
    " <trailingCommisionDealerReference>D3734</trailingCommisionDealerReference>\n" +
    " </orderSalesReference>\n" +
    " </CustomerOrder>\n" +
    " <ContactManagementActivity>\n" +
    " <activityCategory>Proof of Purchase - Mig from 3</activityCategory>\n" +
    " <activityType>Migration from 3</activityType>\n" +
    " <activityDescription>Proof of Purchase Information</activityDescription>\n" +
    " <activityComment>MSISDN: 0425265789354610026170561</activityComment>\n" +
    " </ContactManagementActivity>\n" +
    "</migrateOrder>\n", "UTF-8");
    //data += "&" + URLEncoder.encode("key2", "UTF-8") + "=" + URLEncoder.encode("value2", "UTF-8");
    System.out.println("Data going for Request : "+data);
    // Send data
    URL url = new URL("http://172.22.161.101:8017/app/mig3/migrate/MigrateOrder");
    URLConnection conn = url.openConnection();
    conn.setDoOutput(true);
    OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
    wr.write(data);
    wr.flush();
    // Get the response
    BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
    int i=0;
    while ((line = rd.readLine()) != null) {
    System.out.println("Values of Line : "+ i + " : "+ line);// Process line...
    i++;
    wr.close();
    rd.close();
    } catch (Exception e) {
    =========================================
    Code 1 Response
    Values of Line : 0 : <?xml version="1.0" encoding="UTF-8"?>
    Values of Line : 1 : <migrateOrderReply><statusCode>Failed</statusCode><errorReturn><errorCode>CORE_SYS_GENERIC</errorCode><errorMessage>Unexpected System exception</errorMessage></errorReturn></migrateOrderReply>
    Process exited with exit code 0.
    Note: The above response message is the default response message, even if u not pass any input parameter then also the above message will come.
    ==========================================================================================================
    Code 2 : Using Servlet
    package retriggerpsftorder;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.Servlet;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.http.client.HttpClient;
    import org.apache.commons.httpclient.HttpConnection;
    import org.apache.commons.httpclient.HttpState;
    import org.apache.commons.httpclient.NameValuePair;
    import org.apache.commons.httpclient.URI;
    import org.apache.commons.httpclient.methods.PostMethod;
    import org.apache.commons.httpclient.methods.RequestEntity;
    import org.apache.http.client.HttpClient;
    public class GIFTProcess extends HttpServlet implements Servlet {
    private static final String CONTENT_TYPE =
    "text/html; charset=windows-1252";
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    public void doGet(HttpServletRequest req,
    HttpServletResponse resp) throws ServletException,
    IOException {
    resp.setContentType(CONTENT_TYPE);
    PrintWriter out = resp.getWriter();
    try {
    NameValuePair nvpRtn =
    new NameValuePair("body", "<migrateOrder>\n" +
    " <migrateOrderId>51c797d61dd211b2818a</migrateOrderId>\n" +
    " <createCustomer>false</createCustomer>\n" +
    " <createBillingAccount>false</createBillingAccount>\n" +
    " <Customer>\n" + " <ID>\n" +
    " </PIN>\n" +
    "     </customerAccountNumber\"></customerAccountNumber\">\n" +
    " </externalIdentifier>\n" +
    " </ID>\n" +
    " <creditClass>W</creditClass>\n" +
    " </Customer>\n" + " <Account>\n" +
    " <name>Gurwinder Singh</name>\n" +
    " <ID>\n" + " <PIN>1987</PIN>\n" +
    "     <billingAccountNumber>695909361</billingAccountNumber>\n" +
    " </ID>\n" + " </Account>\n" +
    " <CustomerOrder>\n" +
    " <customerOrderPartyReference>\n" +
    " <MSISDN>61425265789</MSISDN>\n" +
    " </customerOrderPartyReference>\n" +
    " <orderSource>\n" +
    " <templateName>AUP1057_AU10357_24_DATA_0113</templateName>\n" +
    " </orderSource>\n" +
    " <typeCode>Connect</typeCode>\n" +
    " <futureSubmitDate>2011-02-28</futureSubmitDate>\n" +
    " <cancelOpenOrdersIndicator>false</cancelOpenOrdersIndicator>\n" +
    " <lineItem actionCode=\"Add\" priorityRanking=\"1\">\n" +
    " <product ID=\"AUX221\" type=\"SAMID\" attributeCount=\"19\">\n" +
    " <attribute>\n" +
    " <name>Accept Code</name>\n" +
    " <value>Accept 5</value>\n" +
    " </attribute>\n" +
    " </product>\n" + " </lineItem>\n" +
    " <lineItem actionCode=\"Add\" priorityRanking=\"2\">\n" +
    " <product ID=\"OFF0018\" type=\"SAMID\" attributeCount=\"1\">\n" +
    " <attribute>\n" +
    " <name>Period Override</name>\n" +
    " <value>24</value>\n" +
    " </attribute>\n" +
    " </product>\n" + " </lineItem>\n" +
    " <lineItem actionCode=\"Allocate\" priorityRanking=\"3\">\n" +
    " <equipment ID=\"012645002053476\" type=\"Handset\" />\n" +
    " </lineItem>\n" +
    " <lineItem actionCode=\"Allocate\" priorityRanking=\"4\">\n" +
    " <resource ID=\"89610300000905636996\" type=\"SIM\" />\n" +
    " </lineItem>\n" +
    " <externalOrderReference>\n" +
    " <serviceID>75055433</serviceID>\n" +
    " <customerID>921092224696621123154029260421</customerID>\n" +
    " <serviceStartDate>2009-02-10</serviceStartDate>\n" +
    " <serviceRatePlan>X3Cap $29 24m($29min-35cFF)</serviceRatePlan>\n" +
    " <agreementNumber>VHU0029215</agreementNumber>\n" +
    " <accountNumber>3382437469</accountNumber>\n" +
    " <migrationType>Loyalty Handset Upgrade Acq</migrationType>\n" +
    " <receiveMarketingInfoOverrideIndicator>false</receiveMarketingInfoOverrideIndicator>\n" +
    " </externalOrderReference>\n" +
    " <orderSalesReference>\n" +
    " <dealerReferenceID>D3641</dealerReferenceID>\n" +
    " <trailingCommissionRatePlan>MUPR9</trailingCommissionRatePlan>\n" +
    " <trailingCommisionDealerReference>D3734</trailingCommisionDealerReference>\n" +
    " </orderSalesReference>\n" +
    " </CustomerOrder>\n" +
    " <ContactManagementActivity>\n" +
    " <activityCategory>Proof of Purchase - Mig from 3</activityCategory>\n" +
    " <activityType>Migration from 3</activityType>\n" +
    " <activityDescription>Proof of Purchase Information</activityDescription>\n" +
    " <activityComment>MSISDN: 0425265789354610026170561</activityComment>\n" +
    " </ContactManagementActivity>\n" +
    "</migrateOrder>\n");
    NameValuePair[] nvpout = { nvpRtn };
    HttpConnection httpConn = new HttpConnection("172.22.161.101", 8017);
    System.out.println("httpConn : " + httpConn.getHost() + " getPost: " + httpConn.getPort());
    httpConn.open();
    System.out.println("Is Connection Open? --> " + httpConn.isOpen());
    PostMethod postMethod = new PostMethod();
    postMethod.setPath("http://172.22.161.101:8017/app/mig3/migrate/MigrateOrder");
    System.out.println("postMethod.getPath() : " + postMethod.getPath());
    //postMethod.setQueryString("http://172.22.161.101:8017/app/mig3/migrate/MigrateOrder");
    //System.out.println("getQueryString : " + postMethod.getQueryString());
    //System.out.println("postMethod.getParams() : " + postMethod.getParams());
    postMethod.setRequestBody(nvpout);
    System.out.println("validate--> " + postMethod.validate());
    postMethod.execute(new HttpState(), httpConn);
    System.out.println("isRequestSent --> " + postMethod.isRequestSent());
    System.out.println("statusLine--> " + postMethod.getStatusLine());
    String serviceResponse = postMethod.getResponseBodyAsString();
    System.out.println("Response from Call : " + serviceResponse);
    } catch (Exception e) {
    out.println("Error Occured during the process.");
    e.printStackTrace();
    ==========================================================================================
    Code 2 Response -----
    C:\Oracle\Middleware\SOASuite101351\jdk\bin\javaw.exe -jar C:\jdevstudio10135\j2ee\home\admin.jar ormi://10.161.1.169:23891 oc4jadmin **** -updateConfig
    11/03/02 15:30:19 WARNING: Shared-library oracle.expression-evaluator:10.1.3.1 is closing, but is imported by adf.oracle.domain:10.1.3.1, adf.generic.domain:10.1.3.1.
    2/03/2011 15:30:19 com.oracle.corba.ee.impl.orb.ORBServerExtensionProviderImpl preInitApplicationServer
    WARNING: ORB ignoring configuration changes. Restart OC4J to apply new ORB configuration.
    Ready message received from Oc4jNotifier.
    Embedded OC4J startup time: 7765 ms.
    Target URL -- http://10.161.1.169:8988/JAVAProject-RetriggerPSFTOrder-context-root/giftprocess
    ERROR: Unable to connect to JQS service: connection refused
    11/03/02 15:30:22 httpConn : 172.22.161.101 getPost: 8017
    11/03/02 15:30:22 Is Connection Open? --> true
    11/03/02 15:30:22 postMethod.getPath() : http://172.22.161.101:8017/app/mig3/migrate/MigrateOrder
    11/03/02 15:30:22 validate--> true
    11/03/02 15:30:22 isRequestSent --> true
    11/03/02 15:30:22 statusLine--> HTTP/1.1 200 OK
    2/03/2011 15:30:22 org.apache.commons.httpclient.HttpConnection releaseConnection
    WARNING: HttpConnectionManager is null. Connection cannot be released.
    11/03/02 15:30:22 Response from Call : <?xml version="1.0" encoding="UTF-8"?>
    <migrateOrderReply><statusCode>Failed</statusCode><errorReturn><errorCode>CORE_SYS_GENERIC</errorCode><errorMessage>Unexpected System exception</errorMessage></errorReturn></migrateOrderReply>
    ==================================================================================
    If u find any thing wrong then please let me know.
    Any reply is highly appreciated.
    Thanks Manish

  • What the mechanism of the Java Proxy for Web Services in WLS 8.1

    Hi, all;
    I try to find out how the java proxy of web service in weblogic server 8.1
    works. Suppose I use the java Proxy of a WebSerice in a client application whatever
    whithin or outside the application of the web service, does the proxy actually:
    1. translate my java arguments objects in XML to create SOAP msg,
    2. then send the msg across the network, and web service also response SOAP msg,
    3. then proxy translate it into return value of the method call ?
    If that is true , the Java Proxy seems very inefficient, right?
    Can any body tell me how the proxy works ?
    regards,
    shannon

    Hi Shannon,
    The type of proxy I'm familiar with is at the http connection level and
    associated with the networking properties in the JDK, See:
    http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html
    Your question may be related to JWS proxies, See:
    http://edocs.bea.com/workshop/docs81/doc/en/workshop/guide/howdoi/howUseTheJavaProxyForAWebService.html
    You may want to ask this question in the workshop newsgroup.
    Hope this helps,
    Bruce
    shannon lee wrote:
    >
    Hi, all;
    I try to find out how the java proxy of web service in weblogic server 8.1
    works. Suppose I use the java Proxy of a WebSerice in a client application whatever
    whithin or outside the application of the web service, does the proxy actually:
    1. translate my java arguments objects in XML to create SOAP msg,
    2. then send the msg across the network, and web service also response SOAP msg,
    3. then proxy translate it into return value of the method call ?
    If that is true , the Java Proxy seems very inefficient, right?
    Can any body tell me how the proxy works ?
    regards,
    shannon

  • NPE when working with connections.xml for Web Service client

    Our ADF Web Service clients needs to read the WSDL and End point URL from connections.xml. But this is giving an Error.
    Here are the details:
    jdevloper 11.1.1.6.0
    Weblogic 10.3.5
    OWSM 11.1.1.6
    From my ADF based Application I need to call out a web service.
    For this I have built a Web Service Proxy and coded to call it from the application.
    Since the app needs to run through the development testing deployment lifecycle and hence be deployed on different environments, we need the ability allow configuration of wsdl and end point URL for the web service call without the need to recompile the app.
    We want to leverage the connections.xml for this purpose.
    http://docs.oracle.com/cd/E23943_01/web.1111/b31974/web_services.htm#autoId6
    My connection.xml looks like:
       <Reference name="MyService" className="oracle.adf.model.connection.webservice.impl.WebServiceConnectionImpl" xmlns="">
          <Factory className="oracle.adf.model.connection.webservice.api.WebServiceConnectionFactory"/>
          <RefAddresses>
             <XmlRefAddr addrType="WebServiceConnection">
                <Contents>
                   <wsconnection description="file:/C:/JDeveloper/mywork/jdev116/DeployTstCnnxtnLov/LovProxy/src/abc/lov/proxy/MyService.wsdl" service="{http://xmlns.oracle.com/Enterprise/HCM/services/MyService.1}MyService">
                      <model name="{http://xmlns.oracle.com/Enterprise/HCM/services/MyService.1}MyService" xmlns="http://oracle.com/ws/model">
                         <service name="{http://xmlns.oracle.com/Enterprise/HCM/services/MyService.1}MyService">
                            <port name="MyService_Port" binding="{http://xmlns.oracle.com/Enterprise/HCM/services/MyService.1}MyService_Binding">
                               <soap addressUrl="http://<machine:port>/PSIGW/PeopleSoftServiceListeningConnector" xmlns="http://schemas.xmlsoap.org/wsdl/soap/"/>
                               <operation name="MyServiceOperation">
                                  <soap soapAction="MyServiceOperation.v1" xmlns="http://schemas.xmlsoap.org/wsdl/soap/"/>
                                  <output name="MyService_RESP.V1"/>
                                  <input name="MyService_REQ.V1"/>
                               </operation>
                            </port>
                         </service>
                      </model>
                   </wsconnection>
                </Contents>
             </XmlRefAddr>
          </RefAddresses>
       </Reference>
    My code in the Service Client Looks like:
      @WebServiceRef
      private static MyService myservice;
                Context ctx = ADFContext.getCurrent().getConnectionsContext();
                WebServiceConnection wsc =
                    (WebServiceConnection)ctx.lookup("MyService");
                String urlString = wsc.getWsdlUrlStr();
                System.out.println("WSDL URL: "+urlString);
                myservice = wsc.getJaxWSPort(MyService.class);
                MyService_PortType port = myservice.getMyService_Port();
      ServiceRequest request = new ServiceRequest();
      ServiceResponse response = port.MyServiceOeration(request);
    The WSDL URL is being read correctly.
    Error:
    This error appears to be triggered by the code:
        myservice = wsc.getJaxWSPort(MyService.class);
    java.lang.NullPointerException
            at java.lang.Class.isAssignableFrom(Native Method)
            at oracle.j2ee.ws.common.jaxws.runtime.GenericJavaType.create(GenericJavaType.java:97)
            at oracle.j2ee.ws.common.jaxws.runtime.GenericJavaType.create(GenericJavaType.java:118)
            at oracle.j2ee.ws.common.jaxws.runtime.OperationMappingModeler.processParameters(OperationMappingModeler.java:268)
            at oracle.j2ee.ws.common.jaxws.runtime.OperationMappingModeler.processMethod(OperationMappingModeler.java:155)
            at oracle.j2ee.ws.common.jaxws.runtime.ServiceEndpointRuntimeModeler.buildRuntimeModel(ServiceEndpointRuntimeModeler.java:114)
            at oracle.j2ee.ws.client.jaxws.WsClientProxyFactory.getRuntimeMetadata(WsClientProxyFactory.java:69)
            at oracle.j2ee.ws.client.jaxws.WsClientProxyFactory.createProxy(WsClientProxyFactory.java:126)
            at oracle.j2ee.ws.client.jaxws.WsClientProxyFactory.createProxy(WsClientProxyFactory.java:106)
            at oracle.j2ee.ws.common.jaxws.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:219)
            at oracle.j2ee.ws.common.jaxws.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:249)
            at oracle.adf.model.connection.webservice.impl.WebServiceConnectionImpl.getJaxWSPort(WebServiceConnectionImpl.java:385)
            at abc.lov.proxy.MyService_PortClient.fetchDesc(MyService_PortClient.java:84)
            at abc.lov.ServiceManager.fetchEmplID(ServiceManager.java:13)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    Hi Frank,
    I got the following two lines of code just to check if WebServiceConnection was able to read the connections file alright.
                String urlString = wsc.getWsdlUrlStr();
                System.out.println("WSDL URL: "+urlString);
    I am not using urlString for further processing.
    The output is
    WSDL URL: http://<host>/PSIGW/PeopleSoftServiceListeningConnector/MyService.1.wsdl
    java.lang.NullPointerException
            at java.lang.Class.isAssignableFrom(Native Method)
            at oracle.j2ee.ws.common.jaxws.runtime.GenericJavaType.create(GenericJavaType.java:97)
            at oracle.j2ee.ws.common.jaxws.runtime.GenericJavaType.create(GenericJavaType.java:118)
    The WSDL Url pointed to is the one that I configure in the connection while deploying the App.
    Ran a test and WSDL Url is accessible by the app.

  • Compatability with Java 5 EE Web Services

    I am new to Flash 8. I am trying to consume a web service
    that is running on my Java EE 5 (GlassFish) application server.
    First, can anyone comment on compatability of Flash 8 with web
    services not created with Cold Fusion.
    I am able to connect and execute a sample web (wsdl at
    http://www.flash-mx.com/mm/tips/tips.cfc?wsdl).
    This works for me.
    But when I try to call a very simple service that I have
    defined using Java JAX-WS, I don't see a response. I have attached
    action script code and xml for my wsdl.
    Most samples and tutorials that I have seen so far involve
    web services defined in ColdFusion. However, what I need to do in
    my Flash 8 document is directly access a web service defined and
    running in Jave EE 5 environment. Does Flash 8 support this type of
    interoperability? Can anyone provide some hints on how to get this
    working?
    Thanks

    Hi Tom,
    I've been running into the same problem, having JAX-WS
    generating the WSDL for me and Flash telling me that it cannot
    consume the corresponding Web Service.
    According to an article I found on the Developer Center site
    http://www.adobe.com/devnet/flash/articles/flmxpro_webservices_03.html
    ), "Flash MX Professional 2004 does not support web services that
    use the import tag". I haven't been able to find any reference that
    indicates whether this has changed for Flash 8.
    I tried to contact the author of the article (who is no
    longer with Adobe), but so far she has ignored my attempts.
    Our problem thus may lie in the Flash's inability to process
    the import tag, although this has at least been part of the
    specification since WSDL 1.1.
    There has been no mentioning of a true workaround for this:
    the JAX-WS people don't offer an option to have the schema created
    inline - and IMHO rightfully so. They hold their end of the deal
    (generating a WSDL document that is valid according to the
    standard) for which they used the most flexible option (it allows
    for reuse of schemas between multiple WSDL definitions).
    The only thing I guess you can do is manually inline the
    separate XSD file(s) into the WSDL file and then feed it to
    Flash...
    It is up to the Flash developers to fix this problem and have
    their tool comply with the official W3C standards. It cannot be
    that such a widely used tool renders itself obsolete by
    disregarding interoperability with other widely used
    technologies...
    Sorry I cannot be of more help. Seems I'm stuck with the same
    problem for now as well...or maybe someone out there has better
    insights and helps us out?
    Grtz,
    Morris

  • Cmd-line client for web service

    Hi there,
    I'm new to Sun Java Studio, but generally familiar with the technology. So far I managed to build a web service and to register it.
    Now I would like to build a simple cmd-line client to invoke this web services. I couldn't find anything in the "documentation" or "tutorial". Does anybody has some sample code?
    Thanks,
    Andreas

    The tutorial http://www.netbeans.org/kb/50/quickstart-webservice-client.html provides a sample for developing a standalone client that consumes a webservice.
    The tutorial is for NetBeans 5.0 (http://www.netbeans.info/downloads/download.php?type=5.0) but should be applicable for JSE8 (based on NB4.1).

  • Java API for Web Services

    I have a .NET web service and want to make a JAVA API to communicate with the .NET webservice. Is there an easy API that will deal with the SOAP packaging and accomplish the communication for me?

    I'm not sure If I understand you question, but you should be able to take the WSDL description of the .NET web service, point your favorite java development environment at it (either locally or via a URL) and say generate me a WS client for that.
    Most environments include this as one of their tutorials.
    There are also command line tools.
    -- Frank

  • Problem with java and flex web service

    Hi,
    I have a basic web service written in java using jax ws 2.1
    ri. I need to call it from Flex using the WebService class
    Annotations for the java web method :
    @WebMethod
    public void Login(
    @WebParam(name="server") String serverURL,
    @WebParam(name=AUTHENTICATE_HEADER,header=true,mode=WebParam.Mode.INOUTHolder<Authenticate Header>
    authHeader)
    When I try and call the service from Flex , it can't find the
    login method and attempts to call it fail. If I set the web service
    to RPC based using @SOAPBinding , the method is found but then
    there are issues with the authentication header.
    What do I need to do to get flex web services communicating
    succesfully with java ?
    Are there are any known compatibility issues ? Or guidelines
    for going about this ?
    Any help would be appreciated

    well Shay,
    i've used JDev's tools to developer and to deploy the web service: the war and ear files are automatically generates you to the end of the process.
    I have included all the files java and the compiled classes, but I do not have files jar.
    But don't works: if i create only one java class with all code inside then it works fine!!
    Daniele

  • Java Stack for Web Service in R/3

    Hello Friends,
    I am developing a Web Service in R/3 server. Developed a RFC and converted it to Web Sevice.
    My question is, is it necessarily required to have Java Stack in my server or will it be enough to have ABAP Stack.  My server doesn't have java stack installed. shall i be able to run my Web service with ABAP stack? 
    Please help me and give me some suggesions.
                            Kumar.

    Hi Kumar,
    the above answer is simply incorrect.
    You can certainly provide a web service from the ABAP stack without any need for a Java stack.
    There are several blogs, and lots of forum posts, that discuss how to do this.
    If you have indeed "Developed a RFC and converted it to Web Service" then you are away.
    Use transaction SOAMANAGER ( or WSADMIN, WSCONFIG on earlier releases) to publish your webservice and away you go.
    Cheers
    Graham Robbo

  • Modifying properties with a file for Web Service Stub used for Oracle Forms

    I have created a stubbed-out web service in JDeveloper (10.1.3.4) and imported into Oracle Forms.
    However, I would like to use a properties file to call the appropriate endpoint based on if the environment is dev, test, UAT or prod. I see that a properties file is referenced in the _Stub class. Here is a snippet of code from that class file:
    public CriticalChangeWS_Soap11_Stub(HandlerChain handlerChain) {
    super(handlerChain);
    setProperty(ENDPOINTADDRESS_PROPERTY, "http://epw-01.gds.graebel.com:8087/CriticalChange.svc/Soap11");
    setSoapVersion(SOAPVersion.SOAP_11);
    setServiceName( new QName("http://tempuri.org/","CriticalChangeService"));
    setPortName( new QName("http://tempuri.org/","CriticalChangeWS_Soap11"));
    setupConfig("wsquery/proxy/runtime/CriticalChangeWS_Soap11_Stub.xml");
    How can I use the XML file to set the ENDPOINT_ADDRESS_PROPERTY?
    Thanks.
    Jim O

    Hi Frank,
    I got the following two lines of code just to check if WebServiceConnection was able to read the connections file alright.
                String urlString = wsc.getWsdlUrlStr();
                System.out.println("WSDL URL: "+urlString);
    I am not using urlString for further processing.
    The output is
    WSDL URL: http://<host>/PSIGW/PeopleSoftServiceListeningConnector/MyService.1.wsdl
    java.lang.NullPointerException
            at java.lang.Class.isAssignableFrom(Native Method)
            at oracle.j2ee.ws.common.jaxws.runtime.GenericJavaType.create(GenericJavaType.java:97)
            at oracle.j2ee.ws.common.jaxws.runtime.GenericJavaType.create(GenericJavaType.java:118)
    The WSDL Url pointed to is the one that I configure in the connection while deploying the App.
    Ran a test and WSDL Url is accessible by the app.

  • Simple Client for web service ...Perl way

    II need to get information from a web service (with a defined WSDL)...I have been able to do that with Perl ((using SOAP:Lite) which is pretty staight forward....
    I was trying to do the same with Java ..I tried to find tutorials ...but was overwhelmed with the amount of information ..in there .(They talk about writing the server installing axis etc ..but fail interms of a simple explanation to create a simple client
    I was wondering if you could help me to get hold of a tutorial/resource which helps in simply creating a connection and getting information from the remote application...

    hi
    writing webservices using tomcat and axis is pretty easy ..... you have to create a java class to describe your service .... and save it in the axis subdirectory of tomcat .... and call the service from a client on a remote machine using the IP address and port details ...

  • Mutual Authentication client for Web Service

    Hi,
    How I can tell java to use this particular client certificate in mutual authentication.
    I have two certificates
    1) cacert.pem and
    2) client.pem (includes private key),
    client.pem is signed by cacert.pem and also contains the private key. I have the wsdl file for the webservice that I have to call and I can generate java wrappers of it using wsdl2java.
    Infact I just called web services that used Server-Only SSL/TLS authentication, in that case I just had to add root/CA certificate (in cer format) in the JREs cacerts file and used https for the webservice url, and all worked file
    Now I can't understand what to do for mutual authentication.
    Thanks in advance.
    Sohaib

    Hi,
    How I can tell java to use this particular client certificate in mutual authentication.
    I have two certificates
    1) cacert.pem and
    2) client.pem (includes private key),
    client.pem is signed by cacert.pem and also contains the private key. I have the wsdl file for the webservice that I have to call and I can generate java wrappers of it using wsdl2java.
    Infact I just called web services that used Server-Only SSL/TLS authentication, in that case I just had to add root/CA certificate (in cer format) in the JREs cacerts file and used https for the webservice url, and all worked file
    Now I can't understand what to do for mutual authentication.
    Thanks in advance.
    Sohaib

  • Error converting CFML arguments to Java classes for web service invocation.

    Hello all.
    I am working on writting a small application that will use a web service that is provided by our IVR (Angel.com). I am able to login, however when I attempt to do anything with complex objects, I get the error stated in the title.
    It seems to be having a problem with the array, because when I remove it, or turn it into a simple string, i get errors about the function not being found. I am fairly new to web services, and especially dealing with complex data types, so any help would be much appreciated.
    You can see my testing page at
    http://webservices.fpitesters.com/AngelCalls.cfm
    The WSDL I am using can be found at
    http://www.angel.com/outbound/wsdl/OutboundCallService.wsdl
    Here is sample code that does what I want it to do in Java / Apache Axis
    http://www.socialtext.net/ivrwiki/index.cgi?java_sample_code
    Here is a description of the function I am having problems with
    http://www.socialtext.net/ivrwiki/index.cgi?placecall
    And attached is my code.
         <cfset email = "xxxxxxxxxxxxxxxxxx">
         <cfset pin = "xxxxxxxxxxxx">
         <cfinvoke webservice="http://www.angel.com/outbound/wsdl/OutboundCallService.wsdl" method="login" returnvariable="login">
              <cfinvokeargument name="email" value="#email#"/>
              <cfinvokeargument name="pin" value="#pin#"/>
         </cfinvoke>
         <cfdump var="#login#">
         <cfset Token = login.getToken()>
         <cfdump var="#token#">
         <cfset CallItem.maxWaitTime = 100>
         <cfset CallItem.phoneNumbers[1] = "7632344306">
         <cfset CallItem.siteNumber = 100041>
         <cfinvoke webservice="http://www.angel.com/outbound/wsdl/OutboundCallService.wsdl" method="placeCall" returnvariable="call">
              <cfinvokeargument name="Token" value="#Token#"/>
              <cfinvokeargument name="CallItem" value="#CallItem#"/>
         </cfinvoke>
         <cfdump var="#call#">

    If you are not initializing phoneNumbers as an array before setting
    <cfset CallItem.phoneNumbers[1] = "7632344306">
    it will be passed as a struct with a key of 1.  This could cause your argument conversion error.
    So:
    <cfset CallItem.maxWaitTime = 100>
    <cfset CallItem.phoneNumbers[1] = "7632344306">
    <cfset CallItem.siteNumber = 100041>
    Will result in
    struct
    MAXWAITTIME
    100
    PHONENUMBERS
    struct
    1
    7632344306
    SITENUMBER
    100041
    <cfset CallItem = StructNew() > <!--- For Good Measure --->
    <cfset CallItem.maxWaitTime = 100 >
    <cfset CallItem.phoneNumbers = arrayNew(1) /> <!--- Required --->
    <cfset CallItem.phoneNumbers[1] = "7632344306">
    <cfset CallItem.siteNumber = 100041>
    Will result in
    struct
    MAXWAITTIME
    100
    PHONENUMBERS
    array
    1
    7632344306
    SITENUMBER
    100041
    - Jason Morgan

Maybe you are looking for