Plugging Own Transport Protocol Implementation in JAX-RPC

Hi,
JAX-RPC provides by Default HTTP as transport implementation. And it also provides interfaces and factory patterns to provide own Implementation of TransportFactory etc. But I can not find a way how can I specify it to instantiate my Implementation of transport factory instead of default HTTPClientTransportFactory.
I was assuming that there must be a way through system property etc to do it. But I did not find it.
It will be great if anybody can give me any insight about it.

Please help me or inform me to whom or where I can contact.....

Similar Messages

  • Where i can find weblogic implementation of JAX-RPC

    HI,
    where i can find weblogic implementation of jax-rpc...please help.
    Thanks in advance
    Akhil Nagpal

    Hi Akhil,
    This JAX-RPC 1.0 implementation, is in the WLS 7.0 product itself. Refer to the
    following link for details:
    http://edocs.bea.com/wls/docs70/webserv/index.html
    Regards,
    Mike Wooten
    "Akhil Nagpal" <[email protected]> wrote:
    >
    HI,
    where i can find weblogic implementation of jax-rpc...please help.
    Thanks in advance
    Akhil Nagpal

  • J2EE Web services and JAX-RPC

    Hello..
    While working with J2EE web services using JDeveloper and OC4J, I noticed that it really doesn't confirm to Sun's JAX-RPC standard. The Web Service interface class does not extend the "Remote" and all methods don't throw "RemoteException" as mandated by JAX-RPC standard.
    I have few questions:
    (1) Are the OC4J J2EE web services completey different from JAX-RPC based web services.??
    (2) Does Oracle have any implementation of JAX-RPC??
    (3) Is Sun the only one promoting and implementing the JAX-RPC standard? Or are there other players?
    thanks...

    (1) Are the OC4J J2EE web services completey different from JAX-RPC based web services.??
    OC4J J2EE Web Services originate from Oracle/Apache SOAP with several differences:
    a. A model where each type of implementation gets a specific servlet (e.g. one for EJB's, one for PL/SQL, one for stateless and stateful Java classes. Architecturally, you can see the picture here:
    http://otn.oracle.com/docs/products/ias/doc_library/903doc_otn/generic.903/b10004/orawebservices.htm#1024808
    (scroll down a half page for the picture)
    b. The packaging of the Web services rather than using the Apache SOAP registration mechanism uses something closer to JSR 109 (also known as Web Services for J2EE, part of J2EE 1.4 with JAX-RPC, SAAJ [SOAP API forAttachments in Java] and JAXP [Java API for XML Parsing]), where the Web service is packaged as an ordinary ear file for deployment.
    Oracle built this implementation by extrapolating from the JAX-RPC documentation that was available last year before it was a final specification in an effort to release a production quality Web services implementation that was aligned with JAX-RPC. It has been through two releases - Oracle9iAS 9.02 and Oracle9iAS 9.0.3 and is now being evolved to JAX-RPC as we move to J2EE 1.4.
    (2) Does Oracle have any implementation of JAX-RPC??
    We are planning to release a JAX-RPC implementation in the new year (I don't have specific dates yet) on OC4J. The production implementation of this will be as seamless a migration as possible from the existing implementation. Oracle9i JDeveloper will also add support for JAX-RPC as a 3rd option in its list of choices available. You can get a sense of how such a migration would work by running the Web services wizard in JDev for Apache SOAP and then, in a separate project, running it for Oracle9iAS J2EE Web Services - imagine there being another option for JAX-RPC. The work to migrate should be as simple as running a wizard or command line utility (known as the Web Services Assembler tool in Oracle9iAS).
    (3) Is Sun the only one promoting and implementing the JAX-RPC standard? Or are there other players?
    Pretty much every one in the Java side of industry will be implementing JAX-RPC. The important time to note is when J2EE 1.4 is released ... sometime in the new year ... I believe around March but may be mistaken. Part of J2EE 1.4 is required support for JAX-RPC, SAAJ, Web Services for J2EE etc etc. This will standardize the implementation of Web services. Oracle, like others in the industry, supports the standard protocols, (SOAP), interfaces (WSDL) and registries (UDDI) - what J2EE 1.4 does is standardize the packaging, deployment and implementation (the wrappers generated by the tooling).
    My guess is that around JavaOne (June 2003) there will be a rash of announcements from J2EE vendors announcing support of JAX-RPC and J2EE 1.4 (or early implementations) as we will be in the same race that happened in 2001/2002 when J2EE 1.3 was the spec to announce implementations around.
    Mike.

  • Use of JAX RPC Weblogic Callback Capability

    Just walking through the Callback example in the bea documentation at:
    http://edocs.bea.com/wls/docs100/webserv_adv/callback.html#wp259721
    But I can't seem to get the example to build properly, anyone else have troubles with this?
    Anyone else using callbacks at all?
    Code trying to build:
    = = = = = = = = = = = = = = = = = =
    package jsip.jaxrpc.services;
    import weblogic.jws.WLHttpTransport;
    import weblogic.jws.*;
    import weblogic.wsee.jws.CallbackInterface;
    import javax.jws.WebMethod;
    import javax.jws.WebService;
    @WebService(name="CallbackPortType",
    serviceName="WhereIsWaldo",
    targetNamespace="http://examples.org/")
    @WLHttpTransport(contextPath="callback",
    serviceUri="WhereIsWaldo",
    portName="WhereIsWaldo")
    public class JaxrpcAsyncReqRes
    @Callback
    CallbackInterface callback;
    @WebMethod
    public void callbackOperation (String message)
    callback.callbackOperation (message);
    Error produced:
    = = = = = = = = = = == = =
    [jwsc] [ERROR] - weblogic.jws.CallbackService Annotation must be present on weblogic.wsee.jws.CallbackInterface.
    [jwsc] [ERROR] - The annotation weblogic.jws.Exclude is not allowed on callback interface weblogic.wsee.jws.CallbackInterface.
    Error message when building:

    Hi Akhil,
    This JAX-RPC 1.0 implementation, is in the WLS 7.0 product itself. Refer to the
    following link for details:
    http://edocs.bea.com/wls/docs70/webserv/index.html
    Regards,
    Mike Wooten
    "Akhil Nagpal" <[email protected]> wrote:
    >
    HI,
    where i can find weblogic implementation of jax-rpc...please help.
    Thanks in advance
    Akhil Nagpal

  • Batch operations with JAX-RPC

    I have read a number of different tutorials about Web services and JAX-RPC, and have to come the conclusion that JAX-RPC is the correct approach to use for my project. Most of the examples I have seen involve invoking services which perform a 'one-shot' action e.g. get a Stock Quote.
    My first question is that I am not sure for such 'one-shot' services, how much support there is in the API for sending/receiving arrays of data items. e.g. sending a user's data to a web service which includes an associated list of phone numbers.
    Further if I wanted to send user's data which included an array of nested objects, would I have to implement a serializer/deserialiser plugin?
    My main concern really is how best to handle a batch of requests to the service. My current thought is to use JAX-RPC with an xml document attachment - listing of a number of user's data and their parameters. A 'batch service' would return a response immediately then work through the document and invoke the existing 'single shot' service - which will be hosted on the same web server.
    Is this approach which brings together a number of different ideas from the various JAX-RPC tutorials viable? Are they any better alternatives?
    For example would it be better to implement a JAX-RPC for the single shot service requests and use JAXM for batch service requests? (On the server-side I would still be expecting the batch service to re-use the single-shot service). Can JAXM and JAX-RPC services co-exist on the same web server? I realise that there would be WSDL generated for the JAX-RPC service alone and so for a client developer there will be an inconsistency in terms of how the Web service is accessed.
    Thanks in anticipation

    Hello, I'll try and go through your questions one at a time:
    My first question is that I am not sure for such 'one-shot' services, how much support there is in the API for
    sending/receiving arrays of data items. e.g. sending a user's data to a web service which includes an
    associated list of phone numbers.JAX-RPC has built in support for List type operations. There is no problem sending Arrays of information over the wire. If you were sending an Object of type User, for instance, there would be no problem with User having a List of PhoneNumber types objects as part of it's structure.
    Further if I wanted to send user's data which included an array of nested objects, would I have to implement
    a serializer/deserialiser plugin?Condintional No. If the nested objects contained only data structures that JAX-RPC knows how to deal with, your fine (things like java.lang.String or java.lang.Integer). However, if your nested objects contain types that JAX-RPC does not know how to deal with (i.e. java.sql.TimeStamp), you will have to write a custom serializer/deserializer just like you would if you were passing those objects without them being nested.
    My main concern really is how best to handle a batch of requests to the service. My current thought is to
    use JAX-RPC with an xml document attachment - listing of a number of user's data and their parameters.
    A 'batch service' would return a response immediately then work through the document and invoke the
    existing 'single shot' service - which will be hosted on the same web server.
    Is this approach which brings together a number of different ideas from the various JAX-RPC tutorials
    viable? Are they any better alternatives?As per above you shouldn't have to send an xml document attachment, but I guess you could. Also, for batch processing type tasks you probably want to look at the asychronous mode mentioned in the JAX-RPC part of the JWSDP tutorial.
    For example would it be better to implement a JAX-RPC for the single shot service requests and use
    JAXM for batch service requests? (On the server-side I would still be expecting the batch service to re-use
    the single-shot service). Can JAXM and JAX-RPC services co-exist on the same web server? I realise
    that there would be WSDL generated for the JAX-RPC service alone and so for a client developer there
    will be an inconsistency in terms of how the Web service is accessed.Well, it really is up to you at this point. I assume that you want/need to use web services for access (as opposed to EJBs or any other method). So, I would look at an asychronous web service implementation.

  • Plugin non-HTTP transports in JAX-RPC

    Is it possible to plugin a non-HTTP transports in JAX-RPC?
    I know that Apache SOAP provides a way of plugin non-HTTP transports for it,
    Is there any document that can teach me to write a non-HTTP transport and plug it into JAX-RPC?

    You cannot plug in non-HTTP transports into the JAX-RPC reference implementation.

  • Using DII in JAX-RPC

    I've been trying to connect (unsuccessfully so far) to a webservice using DII in JAX-RPC. Was able to connect to the said webservice successfully using static stubs. But our requirement is for dynamic invocation. Sorry if a topic like this has been posted already. I did search the forums but couldn't find the answer to my problem.
    The WSDL for the web service is as follows:
    <?xml version="1.0" encoding="utf-8"?>
    <definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://secure.yehey.com/2003/01/PayPlus" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://secure.yehey.com/2003/01/PayPlus" xmlns="http://schemas.xmlsoap.org/wsdl/">
    <types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://secure.yehey.com/2003/01/PayPlus">
    <s:element name="Process">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="inpData" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="ProcessResponse">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="ProcessResult" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="GetStatus">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="inxml" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="GetStatusResponse">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="GetStatusResult" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="GetRedirectURL">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="inpURL" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="GetRedirectURLResponse">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="GetRedirectURLResult" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="string" nillable="true" type="s:string" />
    </s:schema>
    </types>
    <message name="ProcessSoapIn">
    <part name="parameters" element="s0:Process" />
    </message>
    <message name="ProcessSoapOut">
    <part name="parameters" element="s0:ProcessResponse" />
    </message>
    <message name="GetStatusSoapIn">
    <part name="parameters" element="s0:GetStatus" />
    </message>
    <message name="GetStatusSoapOut">
    <part name="parameters" element="s0:GetStatusResponse" />
    </message>
    <message name="GetRedirectURLSoapIn">
    <part name="parameters" element="s0:GetRedirectURL" />
    </message>
    <message name="GetRedirectURLSoapOut">
    <part name="parameters" element="s0:GetRedirectURLResponse" />
    </message>
    <message name="ProcessHttpGetIn">
    <part name="inpData" type="s:string" />
    </message>
    <message name="ProcessHttpGetOut">
    <part name="Body" element="s0:string" />
    </message>
    <message name="GetStatusHttpGetIn">
    <part name="inxml" type="s:string" />
    </message>
    <message name="GetStatusHttpGetOut">
    <part name="Body" element="s0:string" />
    </message>
    <message name="GetRedirectURLHttpGetIn">
    <part name="inpURL" type="s:string" />
    </message>
    <message name="GetRedirectURLHttpGetOut">
    <part name="Body" element="s0:string" />
    </message>
    <message name="ProcessHttpPostIn">
    <part name="inpData" type="s:string" />
    </message>
    <message name="ProcessHttpPostOut">
    <part name="Body" element="s0:string" />
    </message>
    <message name="GetStatusHttpPostIn">
    <part name="inxml" type="s:string" />
    </message>
    <message name="GetStatusHttpPostOut">
    <part name="Body" element="s0:string" />
    </message>
    <message name="GetRedirectURLHttpPostIn">
    <part name="inpURL" type="s:string" />
    </message>
    <message name="GetRedirectURLHttpPostOut">
    <part name="Body" element="s0:string" />
    </message>
    <portType name="PayplusSoap">
    <operation name="Process">
    <input message="s0:ProcessSoapIn" />
    <output message="s0:ProcessSoapOut" />
    </operation>
    <operation name="GetStatus">
    <input message="s0:GetStatusSoapIn" />
    <output message="s0:GetStatusSoapOut" />
    </operation>
    <operation name="GetRedirectURL">
    <input message="s0:GetRedirectURLSoapIn" />
    <output message="s0:GetRedirectURLSoapOut" />
    </operation>
    </portType>
    <portType name="PayplusHttpGet">
    <operation name="Process">
    <input message="s0:ProcessHttpGetIn" />
    <output message="s0:ProcessHttpGetOut" />
    </operation>
    <operation name="GetStatus">
    <input message="s0:GetStatusHttpGetIn" />
    <output message="s0:GetStatusHttpGetOut" />
    </operation>
    <operation name="GetRedirectURL">
    <input message="s0:GetRedirectURLHttpGetIn" />
    <output message="s0:GetRedirectURLHttpGetOut" />
    </operation>
    </portType>
    <portType name="PayplusHttpPost">
    <operation name="Process">
    <input message="s0:ProcessHttpPostIn" />
    <output message="s0:ProcessHttpPostOut" />
    </operation>
    <operation name="GetStatus">
    <input message="s0:GetStatusHttpPostIn" />
    <output message="s0:GetStatusHttpPostOut" />
    </operation>
    <operation name="GetRedirectURL">
    <input message="s0:GetRedirectURLHttpPostIn" />
    <output message="s0:GetRedirectURLHttpPostOut" />
    </operation>
    </portType>
    <binding name="PayplusSoap" type="s0:PayplusSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    <operation name="Process">
    <soap:operation soapAction="http://secure.yehey.com/2003/01/PayPlus/Process" style="document" />
    <input>
    <soap:body use="literal" />
    </input>
    <output>
    <soap:body use="literal" />
    </output>
    </operation>
    <operation name="GetStatus">
    <soap:operation soapAction="http://secure.yehey.com/2003/01/PayPlus/GetStatus" style="document" />
    <input>
    <soap:body use="literal" />
    </input>
    <output>
    <soap:body use="literal" />
    </output>
    </operation>
    <operation name="GetRedirectURL">
    <soap:operation soapAction="http://secure.yehey.com/2003/01/PayPlus/GetRedirectURL" style="document" />
    <input>
    <soap:body use="literal" />
    </input>
    <output>
    <soap:body use="literal" />
    </output>
    </operation>
    </binding>
    <binding name="PayplusHttpGet" type="s0:PayplusHttpGet">
    <http:binding verb="GET" />
    <operation name="Process">
    <http:operation location="/Process" />
    <input>
    <http:urlEncoded />
    </input>
    <output>
    <mime:mimeXml part="Body" />
    </output>
    </operation>
    <operation name="GetStatus">
    <http:operation location="/GetStatus" />
    <input>
    <http:urlEncoded />
    </input>
    <output>
    <mime:mimeXml part="Body" />
    </output>
    </operation>
    <operation name="GetRedirectURL">
    <http:operation location="/GetRedirectURL" />
    <input>
    <http:urlEncoded />
    </input>
    <output>
    <mime:mimeXml part="Body" />
    </output>
    </operation>
    </binding>
    <binding name="PayplusHttpPost" type="s0:PayplusHttpPost">
    <http:binding verb="POST" />
    <operation name="Process">
    <http:operation location="/Process" />
    <input>
    <mime:content type="application/x-www-form-urlencoded" />
    </input>
    <output>
    <mime:mimeXml part="Body" />
    </output>
    </operation>
    <operation name="GetStatus">
    <http:operation location="/GetStatus" />
    <input>
    <mime:content type="application/x-www-form-urlencoded" />
    </input>
    <output>
    <mime:mimeXml part="Body" />
    </output>
    </operation>
    <operation name="GetRedirectURL">
    <http:operation location="/GetRedirectURL" />
    <input>
    <mime:content type="application/x-www-form-urlencoded" />
    </input>
    <output>
    <mime:mimeXml part="Body" />
    </output>
    </operation>
    </binding>
    <service name="Payplus">
    <port name="PayplusSoap" binding="s0:PayplusSoap">
    <soap:address location="https://secured.teamyehey.com/payplus/services/payplus.asmx" />
    </port>
    <port name="PayplusHttpGet" binding="s0:PayplusHttpGet">
    <http:address location="https://secured.teamyehey.com/payplus/services/payplus.asmx" />
    </port>
    <port name="PayplusHttpPost" binding="s0:PayplusHttpPost">
    <http:address location="https://secured.teamyehey.com/payplus/services/payplus.asmx" />
    </port>
    </service>
    </definitions>
    My code to access the above webservice (for Process method) is as follows (which is almost an exact copy from the sample code in JWSDP tutorial) :
    String qnameService = "Payplus";
    String qnamePort = "PayplusSoap";
    String BODY_NAMESPACE_VALUE = "http://secure.yehey.com/2003/01/PayPlus";
    String ENCODING_STYLE_PROPERTY = "javax.xml.rpc.encodingstyle.namespace.uri";
    String NS_XSD = "http://www.w3.org/2001/XMLSchema";
    String URI_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
    ServiceFactory factory = ServiceFactory.newInstance();
    Service service = factory.createService(new QName(qnameService));
    QName port = new QName(qnamePort);
    Call call = service.createCall(port);
    call.setTargetEndpointAddress(urlstring);
    call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
    call.setProperty(Call.SOAPACTION_URI_PROPERTY, "http://secure.yehey.com/2003/01/PayPlus/Process");
    call.setProperty(ENCODING_STYLE_PROPERTY, URI_ENCODING);
    QName QNAME_TYPE_STRING = new QName(NS_XSD, "string");
    call.setReturnType(QNAME_TYPE_STRING);
    call.setOperationName(new QName(BODY_NAMESPACE_VALUE, "Process"));
    call.addParameter("inpData", QNAME_TYPE_STRING, ParameterMode.IN);
    String[] params = { getProcessString() }; // getProcessString here returns the parameter required
    String result = (String)call.invoke(params);
    System.out.println(result);
    The error that I keep on getting is this:
    java.rmi.RemoteException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.ArgumentNullException: Value cannot be null.
    Parameter name: s
    at System.IO.StringReader..ctor(String s)
    at Payplus.Payplus.Process(String inpData)
    Any help would be greatly appreciated. Thanks!

    Are you using the JAXRPC implementation from java.sun.com
    for your client invocations? IThis may be an implementation problem
    and if you are not using the sun implementation, then I can not explain
    the exception-
    kathy

  • JAX-RPC And Non-Java Web Service

    Hi,
    This is a total shot in the dark. I'm attempting to consume an RPC web service developed in Delphi. I've created a JAX-RPC client in NetBeans from the published WSDL, attached below. I've created calls to several of the procedures available. What's bizarre, at least to me, is that half of them work fine and half of them don't. In all cases where they don't I'm getting a returns SOAP envelope indicated an access violation, attached below. There are no errors in any of the server logs and the developer assures me that the procedures do, in fact, work from his client (also developed conveniently enough in Delphi).
    I'm willing to take him at face value for the moment and assume that the problem is in my client implementation, although I have no idea where it would lie. The only difference I've been able to gather between the features which work and those that don't is the size of the return package...it would most likely be much larger than the ones that don't work.
    The service is an ISAPI dll running under IIS on Windows Server 2003. Any clues or guidance anyone would be willing to provide would be most welcome. On to the files:
    There wasn't enough room to post the entire thing so I've included one working (CheckStock) and non-working (GetLibTrace) function.
    WSDL:
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="IInnovaServiceservice" targetNamespace="http://tempuri.org/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/">
      <message name="CheckStock2Request">
        <part name="OPC" type="xs:string"/>
      </message>
      <message name="CheckStock2Response">
        <part name="QTY" type="xs:int"/>
        <part name="messages" type="xs:string"/>
        <part name="return" type="xs:int"/>
      </message>
      <message name="GetLibTrace5Request">
        <part name="LibName" type="xs:string"/>
      </message>
      <message name="GetLibTrace5Response">
        <part name="dimensions" type="xs:string"/>
        <part name="messages" type="xs:string"/>
        <part name="return" type="xs:int"/>
      </message>
      <portType name="IInnovaService">
        <operation name="CheckStock">
          <input message="tns:CheckStock2Request"/>
          <output message="tns:CheckStock2Response"/>
        </operation>
        <operation name="GetLibTrace">
          <input message="tns:GetLibTrace5Request"/>
          <output message="tns:GetLibTrace5Response"/>
        </operation>
      </portType>
      <binding name="IInnovaServicebinding" type="tns:IInnovaService">
        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="CheckStock">
          <soap:operation soapAction="urn:InnovaServiceIntf-IInnovaService#CheckStock" style="rpc"/>
          <input>
            <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:InnovaServiceIntf-IInnovaService"/>
          </input>
          <output>
            <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:InnovaServiceIntf-IInnovaService"/>
          </output>
        </operation>
        <operation name="GetLibTrace">
          <soap:operation soapAction="urn:InnovaServiceIntf-IInnovaService#GetLibTrace" style="rpc"/>
          <input>
            <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:InnovaServiceIntf-IInnovaService"/>
          </input>
          <output>
            <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:InnovaServiceIntf-IInnovaService"/>
          </output>
        </operation>
      </binding>
      <service name="IInnovaServiceservice">
        <port name="IInnovaServicePort" binding="tns:IInnovaServicebinding">
          <soap:address location="http://172.20.10.145:8080/innovaservice.dll/soap/IInnovaService"/>
        </port>
      </service>
    </definitions>My client:
    package com.signet.innova.client;
    import com.signet.innova.client.interfaces.IInnovaService;
    import com.signet.innova.client.interfaces.IInnovaServiceservice_Impl;
    import java.net.URL;
    import java.rmi.RemoteException;
    import java.util.ArrayList;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.Stub;
    import javax.xml.rpc.holders.Holder;
    import javax.xml.rpc.holders.IntHolder;
    import javax.xml.rpc.holders.StringHolder;
    import javax.xml.soap.MessageFactory;
    import javax.xml.soap.SOAPMessage;
    import javax.xml.ws.Dispatch;
    import javax.xml.ws.Service;
    public class InnovaClient {
        private void testConnection() {
            Stub stub = createProxy();
            IInnovaService service = (IInnovaService) stub;
            StringHolder sh1 = new StringHolder();
            StringHolder sh2 = new StringHolder();
            StringHolder sh3 = new StringHolder();
            IntHolder ih1 = new IntHolder();
            IntHolder ih2 = new IntHolder();
            IntHolder ih3 = new IntHolder();
            try {
                System.out.println("Calling checkStock()");
                service.checkStock("0103877866", ih1, sh1, ih2);
                System.out.println(" service returned => " + ih1.value + ":" + sh1.value + ":" + ih2.value);
            } catch (RemoteException re) {
                System.out.println(" service returned => " + re.toString());
            try {
                System.out.println("Calling getLibTrace()");
                service.getLibTrace("REGULAR", sh1, sh2, ih3);
                System.out.println(" service returned => " + sh1.value + ":" + sh2.value + ":" + ih1.value);
            } catch (RemoteException re) {
                System.out.println(" service returned => " + re.toString());
        private Stub createProxy() {
            return (Stub) (new IInnovaServiceservice_Impl().getIInnovaServicePort());
        public static void main(String[] args) {
            InnovaClient client = new InnovaClient();
            System.out.print("Running testConnection()...");
            client.testConnection();
    }The request and response packets are in my reply below. Ran out of characters. :o)
    Edited by: Pablo_Vadear on Dec 22, 2009 11:19 PM

    Correction from above...".it would most likely be much larger than the ones that don't work" should have been "it would most likely be much larger IN THE ONES THAT DON'T WORK". Sorry.
    The request:
    POST /innovaservice.dll/soap/IInnovaService HTTP/1.1
    Content-Type: text/xml; charset=utf-8
    Accept: text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
    Content-Length: 484
    SOAPAction: "urn:InnovaServiceIntf-IInnovaService#CheckStock"
    User-Agent: Java/1.6.0_17
    Host: 172.20.10.145:8080
    Connection: keep-alive
    <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="urn:InnovaServiceIntf-IInnovaService" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><env:Body><ns0:CheckStock><OPC xsi:type="xsd:string">0103877866</OPC></ns0:CheckStock></env:Body></env:Envelope>POST /innovaservice.dll/soap/IInnovaService HTTP/1.1
    Content-Type: text/xml; charset=utf-8
    Accept: text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
    Content-Length: 491
    SOAPAction: "urn:InnovaServiceIntf-IInnovaService#GetLibTrace"
    User-Agent: Java/1.6.0_17
    Host: localhost:8080
    Connection: keep-alive
    <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="urn:InnovaServiceIntf-IInnovaService" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><env:Body><ns0:GetLibTrace><LibName xsi:type="xsd:string">REGULAR</LibName></ns0:GetLibTrace></env:Body></env:Envelope>And the response:
    <?xml version="1.0"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><NS1:CheckStockResponse xmlns:NS1="urn:InnovaServiceIntf-IInnovaService"><return xsi:type="xsd:int">0</return><QTY xsi:type="xsd:int">0</QTY><messages xsi:type="xsd:string">Item 0103877866 retrieved OK.
    Right side OPC.
    </messages></NS1:CheckStockResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
    HTTP/1.1 200 OK
    Date: Tue, 22 Dec 2009 23:18:40 GMT
    Server: Microsoft-IIS/6.0
    Content-Type: text/xml
    Content-Length: 486
    <?xml version="1.0"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultactor/><faultcode>SOAP-ENV:Server</faultcode><faultstring>Access violation at address 00000000. Write of address 00000000</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>Any help appreciated.
    Edited by: Pablo_Vadear on Dec 22, 2009 11:23 PM

  • Newbie to attachment with JAX-RPC

    Hi,
    I am new to Web Services. I am developing a web services using oracle technology. I use JDeveloper 10g to create my web services using stateless Java class. Everything are so simple with clicking here and there to generate my WSDL file, web service stub and so on. Oracle use their own servlet as shown below.
    <servlet-name>MyWebService1</servlet-name>
    <servlet-class>oracle.j2ee.ws.StatelessJavaRpcWebService</servlet-class>I had created my interface and implements (Hello.java & HelloImpl.java respectively). Having a method public String sayHello(String param).
    Now, I want to send a attachment (or more than one) to the client using JAX-RPC. My problem now is don't-know-where-to-start. I have gone through a few example but most of the examples are so misleading. I understand that the endpoint of a web services is from servlet. Am I suppose to start my coding to attach the document(*.doc, *.pdf, and so on) to the SOAP object in my Hello.java or HelloImpl.java? Correct me if I am wrong.
    Anyone out there has a sample code of how-to send attachment with JAX-RPC with step-by-step (especially using oracle jdeveloper 10g if exist) article, if any?
    Please help, I am lost. Thanks in advance.
    regards,
    yientau

    Hi,
    I am new to Web Services. I am developing a web services using oracle technology. I use JDeveloper 10g to create my web services using stateless Java class. Everything are so simple with clicking here and there to generate my WSDL file, web service stub and so on. Oracle use their own servlet as shown below.
    <servlet-name>MyWebService1</servlet-name>
    <servlet-class>oracle.j2ee.ws.StatelessJavaRpcWebService</servlet-class>I had created my interface and implements (Hello.java & HelloImpl.java respectively). Having a method public String sayHello(String param).
    Now, I want to send a attachment (or more than one) to the client using JAX-RPC. My problem now is don't-know-where-to-start. I have gone through a few example but most of the examples are so misleading. I understand that the endpoint of a web services is from servlet. Am I suppose to start my coding to attach the document(*.doc, *.pdf, and so on) to the SOAP object in my Hello.java or HelloImpl.java? Correct me if I am wrong.
    Anyone out there has a sample code of how-to send attachment with JAX-RPC with step-by-step (especially using oracle jdeveloper 10g if exist) article, if any?
    Please help, I am lost. Thanks in advance.
    regards,
    yientau

  • JAX-RPC documentliteral with -model option problems in JWSDP 2.0

    Hello,
    I am trying to deploy a service generated with JAX-RPC. Howeverr when I write URL (http://localhost:8080/webservicedeployable/webservice001) in a browser I am getting message: 404 Not Found: Invalid request. Appending ?WSDL shows propers wsdl code, so endpoint URL is allright.. There is my config file delow:
    <?xml version="1.0" encoding="utf-8"?>
    <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
      <service name="webservice001"
               targetNamespace="http://scdjws/webservices/wsdl"
               typeNamespace="http://scdjws/webservices/types"
               packageName="com.service001">
        <interface name="service.MyServicePort" servantName="service.MyServiceImpl"/>     
      </service> 
    </configuration>I am using command:
    wscompile -gen:server -f:documentliteral -s "C:\Documents and Settings\Michal\jbproject\mojservice\src\" -classpath WEB-INF/classes -d build -model webservice001.xml.gz config.xml -keepmy jaxrpc-ri.xml is:
    <?xml version="1.0" encoding="utf-8"?>
    <webServices xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/dd"
                 version="1.0"
                 targetNamespaceBase="http://java.sun.com/xml/ns/jax-rpc/wsi/wsdl"
                 typeNamespaceBase="http://java.sun.com/xml/ns/jax-rpc/wsi/types"
                 urlPatternBase="/ws">
      <endpoint name="service001"
                displayName="Service 001"
                description="This is service001"
                interface="service.MyServicePort"
                implementation="service.MyServiceImpl"
                model="/webservice001.xml.gz"/>
      <endpointMapping endpointName="service001"
                       urlPattern="/webservice001"/>
    </webServices>I am using Tomcat 5.5.16 and JWSDP 2.0.
    Making a call to the service throws exception:
    java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8080/webservicedeployable/webservice001
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:791)
    Thank you in advance for all suggestion.
    Michal

    Hi,
    I reselved the problem by just copying the FastInfoset to the jaxrpc\lib directory (I am sure this should work in a different way).
    Well, the next problem I am getting is that the "XMLStreamWriter" class cannot be found. This class is contained in jsr173_api.jar.
    I guess my main question is the following:
    Which projects are necessary to get this simple helloWorld example to work?
    I did set the JWSDP_HOME varible. Is there another setting I have to make to have all necessary jar-files available and to be able to run the samples?
    Could anybody point me to a tutorial that does not only show a few lines of code (as the HelloWorld sample in the JWSDP-Tutorial) but that would instead lead me through a step-by-step sample application that I write by myself and actually runs at the end? The example in the JWSDP-Tutorial uses all kinds of existing config files which are not explained.
    Thanks for your help.

  • Jax-rpc and soap

    I have implemented a web service using jax-rpc and soap however i am unsure how to go about validating my soap package with my own schema before using the web service. How do i use my own schema to validate this, i think it may be with the wsdl file but i am not sure. At present the wsdl file points to a non existing .xsd file which the soap envelope uses, what i need i to replace this with my own schema, or is there a better way to do this than using jax-rpc and soap?
    cheers
    Andy

    I am in the same situation as you are. Got any solution? please let me know.
    Appreciate your valuable reply

  • JAX-RPC client problems and proxy

    I have deployed a JAX-RPC service in JBoss, but on the client side, I am getting NullPointerException when I attempt to access the service. I believe I'm not creating the proxy in the client properly. Where I need help is:
    1. What should the proper ENDPOINT URI be for the service (my variable "destination" shown below).
    2. What should the code in createProxy() look like?
    WEB Services Shows:
    ===================
    VehicleInfoService ACTIVE
    Address: http://myhost:8080/VehicleInfoService/vehicle
    WSDL: http://myhost:8080/VehicleInfoService/vehicle?WSDL
    Port QName: {http://myhost:8080/wsdl/VehicleInfoService}VehicleInfoServiceIFPort
    Remote interface: testsoap.VehicleInfoServiceIF
    Implementation class: testsoap.VehicleInfoServiceImpl
    Model: http://myhost:8080/VehicleInfoService/vehicle?model
    CLIENT CODE
    ============
    import javax.xml.rpc.*;
    import javax.xml.rpc.Stub;
    import testsoap.*;
    public class TestSOAP
    VehicleInfoServiceIF vehicleInfoServiceInf;
    private String statusMessage = null;
    private static String destination = "http://myhost:8080/VehicleInfoService/v
    ehicle";
    public TestSOAP()
    try
    Stub stub = createProxy();
    // Address of the service
    stub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,
    destination);
    vehicleInfoServiceInf = (VehicleInfoServiceIF)stub;
    catch (Exception ex)
    statusMessage = "Error creating Proxy stub: " + ex.getMessage();
    private static Stub createProxy()
    return(Stub)(new VehicleInfoService_Impl());

    To reply to own posting, I finally discovered that I had a problem with my config.xml file. Once I corrected that, I was able to modify the createProxy entry to:
    private static Stub createProxy()
    return(Stub)(new testacp.VehicleInfoService_Impl().getVehicleInfoServiceIFPo
    rt());
    Corrected config.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration
    xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
    <wsdl location="http://mybox:8080/VehicleInfoService/vehicle?WSDL"
    packageName="testsoap"/>
    </configuration>
    These changes fixed my problem. With the correct entries in config.xml, I no longer got compile errors with "getVehicleInfoServiceIFPort Not Found".

  • Incorrect faultstring for checked exception from JAX-RPC Sun App server 8.1

    I am trying to throw a checked exception in a web service. The checked exception object has a constructor that takes a single custom bean java class argument. It also has a get/setter for that argument .
    Here's the exception class:
    package com.innovativ.esp.websvc;
    public class ValidationException extends Exception implements java.io.Serializable{
    private Test test;
    public ValidationException(Test test) {
    super("from testb set ");
    this.test = test;
    public Test getTest() {
    return this.test;
    public void setTest(Test test) {
    this.test = test;
    The SAOP message for fault is shown as below:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="urn:Service/types">
    <env:Body>
    <env:Fault xsi:type="env:Fault">
    <faultcode>env:Server</faultcode>
    <faultstring>com.innovativ.esp.websvc.ValidationException</faultstring>
    <detail><ns0:ValidationException><message>from testb set </message></ns0:ValidationException>
    </detail>
    </env:Fault>
    </env:Body>
    </env:Envelope>
    The server side JAX-RPC is not sending the "Test" object in the detail part...
    Any idea why it's not including the "Test" in message.
    Thank you for any help....

    Here's the WSDL for the service :
    <?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:Service/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns2="urn:Service/types" name="Service" targetNamespace="urn:Service/wsdl">
    <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:Service/types" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:Service/types">
    <complexType name="sayHelloResponse">
    <sequence>
    <element name="result" type="string" nillable="true"/></sequence></complexType>
    <complexType name="ValidationException">
    <sequence>
    <element name="test" type="tns:Test" nillable="true"/></sequence></complexType>
    <complexType name="Test">
    <sequence>
    <element name="prop" type="string" nillable="true"/></sequence></complexType>
    <element name="sayHello" type="tns:sayHello"/>
    <element name="sayHelloResponse" type="tns:sayHelloResponse"/>
    <element name="ValidationException" type="tns:ValidationException"/></schema></types>
    <message name="IFServiceWS_sayHello">
    <part name="parameters" element="ns2:sayHello"/></message>
    <message name="IFServiceWS_sayHelloResponse">
    <part name="result" element="ns2:sayHelloResponse"/></message>
    <message name="ValidationException">
    <part name="ValidationException" element="ns2:ValidationException"/></message>
    <portType name="IFServiceWS">
    <operation name="sayHello">
    <input message="tns:IFServiceWS_sayHello"/>
    <output message="tns:IFServiceWS_sayHelloResponse"/>
    <fault name="ValidationException" message="tns:ValidationException"/></operation></portType>
    <binding name="IFServiceWSBinding" type="tns:IFServiceWS">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <operation name="sayHello">
    <soap:operation soapAction=""/>
    <input>
    <soap:body use="literal"/></input>
    <output>
    <soap:body use="literal"/></output>
    <fault name="ValidationException">
    <soap:fault name="ValidationException" use="literal"/></fault></operation></binding>
    <service name="Service">
    <port name="IFServiceWSPort" binding="tns:IFServiceWSBinding">
    <soap:address location="http://localhost:5050/ESP/Service" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/></port></service>
    </definitions>

  • Observations/questions on JAX-RPC

    I started developing Web Services on Oracle 9iAS (9.0.2.x). What impressed me is how easy it is to turn any old class into a Web Service; you can focus on and develop the API you want, in relative ignorance that the class is being exposed through SOAP. The whole SOAP layer, including [de]serializing parameters and return values, making the HTTP connection, etc. is provided by the container and the auto-generated client stubs.
    Oracle 9iAS, and earlier versions of WebLogic (6.x) seem to pre-date JAX-RPC and don't have a standard API for client stubs. WebLogic 7 seems to have adopted JAX-RPC, though, and hopefully other vendors will follow suit; it will nice for all client stubs to have the same methods for setting the URL or a username/password.
    I did notice some important differences between Oracle Web Services and JAX-RPC, though:
    - Oracle and WebLogic both provide for the direct exposure of stateless session EJBs as SOAP services. The JAX-RPC reference impl (JWSDK) seems to only provide for the exposure of regular Java classes, and exposing an EJB requires an intermediary Java class to find and call the EJB in question. Is it the intent of the JAX-RPC standard to allow for vendors to directly expose EJBs, while just omitting this as a feature for the reference implementation?
    - Oracle also does not require an explicit step to generate client stubs and WSDL. It can generate these dynamically at runtime inside the servlet engine, and makes these available for download from the service itself. Can this style of auto-generation play nicely with JAX-RPC?
    I also have some questions about JAX-RPC:
    - if java.util.Calendar objects are serialized and deserialized by JWSDK, does that imply that java.util.TimeZone objects are as well?
    - can someone point me at where the standard for exception handling and transport is documented (what exception do services throw, and how are they translated to client-side exceptions)?
    - when the client stub is generated, does that also create client-side skeletons for each user-defined datatype (bean) used as an argument/return type for the service? Can these skeletons be made to implement a particular interface? One of the annoying things about Oracle 9iAS Web Services is that you can't use a client skeleton and the actual (server) bean object interchangeably even if the same get/set method exists on both objects, because the skeleton objects don't implement any interfaces.
    Thanks!
    -- Bill

    Hi,
    I will share with you... what I understand and know ...
    - Oracle and WebLogic both provide for the direct exposure of stateless session EJBs as SOAP services. The JAX-RPC reference impl (JWSDK) seems to only provide for the exposure of regular Java classes, and exposing an EJB requires an intermediary Java class to find and call the EJB in question. Is it the intent of the JAX-RPC standard to allow for vendors to directly expose EJBs, while just omitting this as a feature for the reference implementation?
    Well jsr 109 opens up the possibility of having stateless
    session beans as end points. Naturally to stay aligned with
    this jsr 109, lot of application server vendors have started
    to support this.
    The JAX-RPC ri that you are looking at was releazed befor JSR
    109 spec was solidified and the ri gets released.
    - Oracle also does not require an explicit step to generate client stubs and WSDL. It can generate these dynamically at runtime inside
    the servlet engine, and makes these available for download from the service itself. Can this style of auto-generation play nicely with
    JAX-RPC?
    You should check out the next version of j2ee ri.
    Some of your questions might get address there,
    - if java.util.Calendar objects are serialized and deserialized by JWSDK, does that imply that java.util.TimeZone objects are as well?
    Have check out the jsr 101 Chapter 19 ? That should answer
    your question. You can get it from www.jcp.org
    - can someone point me at where the standard for exception handling and transport is documented (what exception do services throw, and how are they translated to client-side exceptions)?
    http://java.sun.com/webservices/docs/1.0/api/index.html
    Check out the javadocs at the above location of service specific exceptions.
    Also check out 8.2.6 from the spec it might help a little.
    asengup

  • Is JAX-RPC compatible with Apache Axis?

    We are starting a new project, and our design goal is to develop server-side API that is the exposed via Web Services. The goal is to have them run within the Sun Reference Implementation, and within Apache Axis.
    My question is, if we develop to the JAX-RPC Specification, with occasional SAAJ calls for attachment processing, will our Web Services run within Apache Axis? In other words, it Apache Axis JAX-RPC and SAAJ-compatible?

    It seems that the way they handle Attachments is different. Apache Axis seems to have its own way of handling Attachments, even though it is possible that they also support the standard JAX-RPC way.
    Generally speaking, I am not very happy with how JAX-RPC handles attachments, but this is a different subject.

Maybe you are looking for