Debug statements in JAX-RPC code

Hi,
I am trying to do System.out.println statements from my service implementation code. But nothing appears in the ant console window (program is run with ant run).
Is there another console window for tomcat I don't know about, or any other suggestions for printing out values so I can see whats going on in my program?
Regards,
Dan.

Hi, Dan. Console output from your web apps and web services goes to JWSDP_HOME/logs/catalina.out
Mike W.

Similar Messages

  • How to compile and build a war file for JAX-RPC

    Hi all,
    I know that all who use JAX-RPC knows it.
    How to compile JAX-RPC code which was not the sample code of JWSDP example?.
    Which jar file is to be included in classpath?.
    After compiling,how to make a WAR file so i can deploy it in TOMCAT ...anyone plz

    Nobody answers.But i found a right article which was quite helpfull to do it.
    http://java.sun.com/developer/technicalArticles/WebServices/getstartjaxrpc/

  • PL/SQL Code not working without debug statements

    Hi Guys,
    I have a pl/sql code in a procedure, logic iterates through almost 40K records, conditional delete and update.
    When I execute this code, I dont see the deletes and updates happening, though procedure executes for 8 minutes and exits wihtout any error, execption.
    In same procedure when I write some debug statements like dbms_output, then everything seems to be working fine.
    I know this scenario happens in Oracle Forms, wehre we use SYNCHRONIZE.
    But this is plain pl/sql procedure.
    any thoughts on this?
    Av.

    COMMIT ?
    Aside from that, no idea what your procedure looks like, what it does, what version of Oracle you are using, how you are determining "I dont see the deletes and updates happening". etc...
    You'd need to provide a slew of information for anyone to give you any meaningful help.
    I can only assure you that DBMS_OUTPUT doesn't do magic :)

  • 503 error code when trying to access a weblogic jax-rpc webservice

    I'm going crazy on a webservice issue with Weblogic server 10.2.
    I have a DocumentRepository webservice deployed and I generated a JAX-RPC library based on its WSDL.
    Now I'm trying to access this webservice from Spring in a desktop application with the following bean declaration:
    <bean id="documentRepository" class="eu.europa.ec.rdg.efp.services.document.v1_00.DocumentRepository_Impl">
         <constructor-arg value="http://myserver.mycompany.com:7021/efpServices/DocumentRepository?WSDL" />
    </bean>
    But when the Spring application context initializes, after a few minutes, I get the following exception:
    javax.xml.rpc.ServiceException: Failed to parse WSDL http://myserver.mycompany.com:7021/efpServices/DocumentRepository?WSDL weblogic.wsee.wsdl.WsdlException: Failed to read wsdl file from url due to -- java.io.IOException: Server returned HTTP response code: 503 for URL: http://myserver.mycompany.com:7021/efpServices/DocumentRepository?WSDL
    +     at weblogic.wsee.jaxrpc.ServiceImpl.throwServiceException(ServiceImpl.java:174)+
    +     at weblogic.wsee.jaxrpc.ServiceImpl.loadWsdlDefinition(ServiceImpl.java:485)+
    +     at weblogic.wsee.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:119)+
    +     at eu.europa.ec.rdg.efp.services.document.v1_00.DocumentRepository_Impl.<init>(Unknown Source)+
    +     at eu.europa.ec.rdg.efp.services.document.v1_00.DocumentRepository_Impl.<init>(Unknown Source)+
    +     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)+
    +     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)+
    +     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)+
    +     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)+
    +     at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)+
    +     ... 35 more+
    Caused by: weblogic.wsee.wsdl.WsdlException: Failed to read wsdl file from url due to -- java.io.IOException: Server returned HTTP response code: 503 for URL: http://myserver.mycompany.com:7021/efpServices/DocumentRepository?WSDL
    +     at weblogic.wsee.wsdl.WsdlReader.getDocument(WsdlReader.java:313)+
    +     at weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:403)+
    +     at weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:389)+
    +     at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:79)+
    +     at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:66)+
    +     at weblogic.wsee.jaxrpc.ServiceImpl.loadWsdlDefinition(ServiceImpl.java:476)+
    +     ... 43 more+
    Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: http://myserver.mycompany.com:7021/efpServices/DocumentRepository?WSDL
    +     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1305)+
    +     at weblogic.wsee.util.is.InputSourceUtil.loadURL(InputSourceUtil.java:100)+
    +     at weblogic.wsee.util.dom.DOMParser.getWebLogicDocumentImpl(DOMParser.java:118)+
    +     at weblogic.wsee.util.dom.DOMParser.getDocument(DOMParser.java:65)+
    +     at weblogic.wsee.wsdl.WsdlReader.getDocument(WsdlReader.java:311)+
    +     ... 48 more+
    Yet, I can see the WSDL in my browser when I go to http://myserver.mycompany.com:7021/efpServices/DocumentRepository?WSDL
    Now it looks a lot like a proxy issue, which is possible because I'm behind a proxy, and I had to set the following command-line parameters in order to access remote HTTP resources before the spring application context is initialized:
    -DproxySet=true -DproxyHost=<my proxy IP> -DproxyPort=8012
    And I authenticate to my proxy using the following code, once again before the Spring application context is initialized:
    Authenticator.setDefault(new Authenticator() {
                                       protected PasswordAuthentication getPasswordAuthentication() {
                                            return new PasswordAuthentication(<my login>, <my password>);
    Yet, those settings seem to have absolutely no effect on how the webservice client is loading the WSDL.
    So my question is the following: is it possible to specify a proxy to be used by the webservice client class to load the WSDL? If yes, how?
    On the other hand, if it was a proxy issue, then I guess the webservice client couldn't reach the server and I would get a connection timeout or something. But here I get a response, even though it's a 503 error. Any other idea where my exception comes from?
    I'm really desperate here. I've tried to ask our corporate weblogic support but they couldn't reproduce my issue. I've been fighting with this for weeks. Please help!

    Please, take a look at https://blogs.oracle.com/proactivesupportWCC/entry/clustering_and_high_availability_for (and contact the support group as advised)

  • JAX-RPC deserialization error: unexpected XML reader state

    Guys,
    Trying to write a Jax-Rpc client that consumes a web service hosted on WebLogic 7.1 talking soap 1.1. I can bind to that service using Apache SOAP - so I don't think that service is returning invalid XML.
    Is there something in my client's classpath that's old or not compatible ?
    Getting the following exception
    java.rmi.RemoteException: Runtime exception; nested exception is:
    deserialization error: unexpected XML reader state. expected: END but found: START: stockSymb
    ol
    deserialization error: unexpected XML reader state. expected: END but found: START: stockSymbol
    at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:209)
    at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerIm
    pl.java:115)
    at trader.TraderServicePort_buy_ResponseStruct_SOAPSerializer.doDeserialize(TraderServicePort
    buyResponseStruct_SOAPSerializer.java:37)
    at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:165)
    at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerIm
    pl.java:115)
    at trader.TraderServicePort_Stub._deserialize_buy(TraderServicePort_Stub.java:180)
    at trader.TraderServicePort_Stub._readFirstBodyElement(TraderServicePort_Stub.java:153)
    at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:168)
    at trader.TraderServicePort_Stub.buy(TraderServicePort_Stub.java:115)
    at portal.jsp._portal._test.__TestJaxrpc._jspService(__TestJaxrpc.java:83)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:120)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:138)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:945)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:909)
    at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:2
    69)
    at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:392)
    at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:274)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:130)
    CAUSE:
    unexpected XML reader state. expected: END but found: START: stockSymbol
    at com.sun.xml.rpc.streaming.XMLReaderUtil.verifyReaderState(XMLReaderUtil.java:49)
    at trader.TradeResult_SOAPSerializer.doDeserialize(TradeResult_SOAPSerializer.java:66)
    at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:165)
    at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerIm
    pl.java:115)
    at trader.TraderServicePort_buy_ResponseStruct_SOAPSerializer.doDeserialize(TraderServicePort
    buyResponseStruct_SOAPSerializer.java:37)
    at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:165)
    at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerIm
    pl.java:115)
    at trader.TraderServicePort_Stub._deserialize_buy(TraderServicePort_Stub.java:180)
    at trader.TraderServicePort_Stub._readFirstBodyElement(TraderServicePort_Stub.java:153)
    at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:168)
    at trader.TraderServicePort_Stub.buy(TraderServicePort_Stub.java:115)
    at portal.jsp._portal._test.__TestJaxrpc._jspService(__TestJaxrpc.java:83)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:120)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:138)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:945)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:909)
    at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:2
    69)
    at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:392)
    at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:274)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:130)
    Thanks
    Atish

    Using WSDP 1.1 this can be fixed IF you're using a static stub to access the service by running wscompile with the -f:searchschema option when generating the client stubs. It will then search the schema aggressively for subtypes when generating the stubs and your client will function correctly. The downside is that this ties your client down to using implementation specific functionality that is not part of the standard, which IMHO is very bad but if you're happy to live with this then it will work.
    Therefore I want to use a dynamic proxy client. For this you don't need to use the wscompile tool to generate client stubs and therefore the above fix doesn't work. I have searched the API documentation for some method that would have the same effect but thus far to no avail. Does anybody have any ideas?
    On a side note I have to say I'm fairly unhappy that in the entire 900 page web services tutorial no mention is made of how to utilise inheritance for parameter and return types without running into problems, neither is any mention made of support for / lack of support for polymorphism which also seems to cause problems. Forgive my sarcasm and lack of grace but, "What, is it 1975 already?" In this day and age I DO expect to be able to use these things without having to specify obscure compiler options, or indeed worry about them in any way whatsoever.

  • JAX-RPC Additional Sample Code

    I am attempting to modify the JAX-RPC HelloWorld scripts to build my own custom application. Is there someplace I can look for more information on creating new JAX-RPC applications? The HelloWorld sample is somewhat limited in explaining what the build scripts are doing, and why.
    Some documentation that describes the different requirements for J2EE app servers and Tomcat would also be helpful.

    section 3.8 of http://java.sun.com/blueprints/guidelines/designing_webservices/html/ details the j2ee side of things

  • Web Service  Stateless Session request using JDeveloepr 11g (JAX-RPC)

    I have been trying to consume web Service by sending Stateless Session request to the system.
    I generated the Java Proxy using JDeveloepr 11g, using JAX-RPC.
    As it is Stateless I need to add following SOAP Header for authentication
    <soap:Header>
    <wsse:Security soap:mustUnderstand="1">
    <wsse:UsernameToken>
    <wsse:Username>[email protected]</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wssusername-
    token-profile-1.0#PasswordText">adminOnDemand</wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    </soap:Header>
    To do this I tried clientuntcredentialprovider as suggested by most of the post online, but found of little help as the server complained of not be able to find the User Name and Password.
    To add to the mess problem I hit was I was not able to View the SOAP Request or Response sent by JDeveloper hence not helping me in debugging the same
    I have tried it on XML SPY by manually adding SOAP Header to the SOAP request and was able to find the response, but I have not been able to do the same using the JDeveloper 11g IDE.
    I have tried HTTP Analyzer assuming it might help, but unfortunately due to the huge size of WSDL, tool hanged my PC each time I loaded it.
    I know it should be fairly straight forward but just feel like missing something.
    Has anybody has got this thing working ?
    Regards,
    Deepak

    What exactly you mean that since your request is stateless you must send a Username token?
    Also, can you put here the code you used to populate the UNT.
    Finally, if possible, can you zip and email your wsdl, the http analyzer should be able to handle wsdls, even if they are huge.
    Thanks,
    Vishal

  • Weblogic 10.3 - Arrays and JAX-RPC Web Services

    We are currently looking at migrating from WL 8.1 to WL 10.3, and have an issue with some of our web services (JAX-RPC) with regards to returning String arrays.
    We have a web service method that returns a response object. This response object has many properties that includes a property that is a String array. So the code looks something like this (this is a simplified version):
    <em>public class OurService
    @RemoteMethod
    @WebMethod
    @WebResult(name = "result")
    public ResponseObject lookup(String someParam)
    // build the object and its properties here...
    return responseObject;
    }</em>
    This is what the response object looks like:
    <em>public class ResponseObject
    private String[] someProperty;
    public String[] getSomeProperty()
    return this.</em><em>someProperty</em><em>;
    public void setSomeProperty(String[] </em><em>someProperty</em><em>)
    this.</em><em>someProperty</em><em>= </em><em>someProperty</em><em>;
    }</em>
    So the issue is this. In WL 8.1, the web service generator would recognise the fact that the response object had a property that was a String array and would declare as such in the WSDL file, for example:
    <em><strong> &lt;xsd:element xmlns:tp="java:language_builtins.lang" type="<font color="#ff0000">tp:ArrayOfString</font>" name="someProperty" minOccurs="1" nillable="true" maxOccurs="1"&gt;
    &lt;/xsd:element&gt;
    </strong></em>
    As a result, when the service is called, the property is returned in the SOAP response like this:
    <strong>.
    </strong>
    <div class="e">
    <div class="c" style="margin-left: 1em; text-indent: -2em">
    <em><strong> <span class="m">&lt;</span><span class="t">someProperty</span><span class="t"> soapenc:arrayType</span><span class="m">="</span></strong><strong>xsd:string[2]<span class="m">"</span><span class="m">&gt;</span></strong></em>
    </div>
    <div>
    <div class="e">
    <div>
    <em><strong><span class="b"> </span><span class="m">&lt;</span><span class="t">string</span><span class="t">
    xsi:type</span><span class="m">="</span></strong><strong>xsd:string<span class="m">"</span><span class="m">&gt;</span><span class="tx">string1</span><span class="m">&lt;/</span><span class="t">string</span><span class="b">&gt;
    &lt;string xsi:type="xsd:string"&gt;string2&lt;/string&gt;
    </span><span class="m">&lt;/</span><span class="t">someProperty</span><span class="m">&gt;</span></strong></em>
    </div>
    </div>
    </div>
    </div>
    <strong>.
    </strong>
    But, in WL 10.3, the WSDL entry is:
    <em><strong> &lt;xs:element maxOccurs="unbounded" minOccurs="0" name="InstepCodes" nillable="true" type="xs:string"&gt;
    </strong></em>
    As a result the property is returned in the SOAP response like this:
    <strong> .
    </strong><strong><span class="m"> &lt;</span><span class="t">java:InstepCodes</span><span class="ns">
    xmlns:java</span><span class="m">="</span></strong><strong class="ns">java:com.myservice</strong><strong><span class="m">"</span><span class="m">&gt;</span><span class="tx">string1</span><span class="m">&lt;/</span><span class="t">java:InstepCodes</span><span class="m">&gt;</span>
    </strong><strong><span class="m"> &lt;</span><span class="t">java:InstepCodes</span><span class="ns">
    xmlns:java</span><span class="m">="</span></strong><strong class="ns">java:com.myservice</strong><strong><span class="m">"</span><span class="m">&gt;</span><span class="tx">string2</span><span class="m">&lt;/</span><span class="t">java:InstepCodes</span><span class="m">&gt;</span>
    </strong>The difference here is that WL 10.3 does not return the array of strings as a complex array type, just as a set of repeated elements.
    We need to return the array as we do for WL 8 in WL 10.3, because we have external clients that are parsing the response and looking for the XML in this format. We are not currently in a position to ask them to change.
    Is this a limitation of the JAX-RPC spec, or WL's implementation of it?
    If the service was to return a String array directly from a service method, then it is declared in the WSDL file.
    However, if a service returns an object that within itself has a property that is an array, it does not recognise it like it did with WL 8.1.
    <strong>
    </strong>
    <div class="e">
    </div>

    Thank you for the reply.
    We are using WL Server 8.1 (not Workshop), and moving to WL Server 10g R3.
    We are using the JWSC task to generate the service, which is:
    bq. weblogic.wsee.tools.anttasks.JwscTask+
    Here is an extract from the Ant build file the calls the task.
    &lt;jwsc
    srcdir="src/com/ourservice"
    sourcepath="src"
    destdir="${ear.dir}"
    verbose="false"
    debug="true"
    keepGenerated="true"
    classpathref="ws.class.path"&gt;
    +&lt;module name="${service.name}" explode="true"&gt;+
    +&lt;jws file="OurService.java" type="JAXRPC"/&gt;+
    +&lt;/module&gt;+
    +&lt;/jwsc&gt;+
    As stated in my first post, the service method returns an reponse object and its this that contains the array property. The service method itself does not return an array type. This seems to be the root of the problem, i.e. the declaration of array types is not being propagated down through the object graph the service method returns. Below is the code for the service and the response object.
    @FileGeneration(remoteClass = Constants.Bool.TRUE, remoteClassName = "OurService", localHome = Constants.Bool.TRUE, localHomeName = "OurServiceLocalHome", remoteHome = Constants.Bool.TRUE, remoteHomeName = "++OurService++Home", localClass = Constants.Bool.TRUE, localClassName = "++OurService++Local")+
    @JndiName(remote = "com.ourservice.++OurService++", local = "com.ourservice.++OurService++Local")+
    @Session(ejbName = "++OurService++", type = Session.SessionType.STATELESS, transactionType = Session.SessionTransactionType.CONTAINER, maxBeansInFreePool = "100", initialBeansInFreePool = "20", enableCallByReference = Constants.Bool.TRUE, homeIsClusterable = Constants.Bool.TRUE, homeLoadAlgorithm = Constants.HomeLoadAlgorithm.ROUND_ROBIN, isClusterable = Constants.Bool.TRUE, beanLoadAlgorithm = "RoundRobin", defaultTransaction = Constants.TransactionAttribute.SUPPORTS)+
    +@RoleMappings( { @RoleMapping(roleName = "Admin", externallyDefined = Constants.Bool.TRUE),+
    +@RoleMapping(roleName = "Monitor", externallyDefined = Constants.Bool.TRUE),+
    +@RoleMapping(roleName = "JMS", externallyDefined = Constants.Bool.TRUE) })+
    @WebService(name = "OurServicePort", serviceName = "OurService", targetNamespace = "http://www.ourservice.com/SOA/OurService+_service")+
    +@SOAPBinding(style = SOAPBinding.Style.RPC, use = SOAPBinding.Use.LITERAL)+
    @WLHttpTransport(contextPath = "OurService", serviceUri = "OurService", portName = "
    *OurService+Port")+
    public class OurService
    +{+
    @RemoteMethod
    @WebMethod
    @WebResult(name = "result")
    {color:#ff0000}public ResponseObject lookup(String someParam){color}
    // build the response object...
    return {color:#ff0000}responseObject{color};
    +}+
    This is what the response object looks like:
    public class ResponseObject
    +{+
    private String[] someProperty;
    +public {color:#ff0000}String[] getSomeProperty(){color}+
    +{+
    return this.someProperty;
    +}+
    public void setSomeProperty(String[] someProperty)
    +{+
    this.someProperty = someProperty;
    +}+
    +}+
    From all of this I cant tell how we get the WSDL file to delcare it as an array type, as shown in the JAX-RPC 1.1 spec you mentioned, based on the code we have and the JWSC build task we are using.
    (I appologise for the formatting of this message. It seems to want to insert + everywhere in the code examples, despite me removing them!)
    Edited by: user8013492 on 11-Dec-2008 02:09
    Edited by: user8013492 on 11-Dec-2008 02:11

  • Bug/flaw in JAX-RPC xrpcc generated output (JWSDP EA1)

    I believe I have found a bug (or flaw) in how xrpcc (JWSDP EA1) is generating stubs and WSDL code as follows:
    If you use simple parameter types (ints, doubles, Strings et al) then xrpcc generates a name that is based on the type (eg. String_1) rather than the
    parm name (senderID) in the WSDL and stub code. I have noticed, however, that if you are using a JavaBean as an input/output parameter to/from a remote method, it generates an XMLSchema ComplexType with the proper names of subelements, so that situation seems to be OK.
    I think this is a bug/flaw in xrpcc...
    For example, if you try to use a remote method that looks somewhat like:
    public int SendTrajectory( String senderID )
    You get the following fragment generated in the WSDL output from xrpcc:
    <message name="sendTrajectory">
    <part name="String_1" type="xsd:string"/>
    whereas I think it should use the actual parameter name for simple parameters and should look like:
    <message name="sendTrajectory">
    <part name="senderID" type="xsd:string"/>
    I read the JAX-RPC Spec (v 0.7....pdf on the Sun web site) and it seems to allude to the fact that the names SHOULD be based on the parameter name in
    section 5.5.5. where it specifically states:
    "Each Java parameter (in the Java method signature) is mapped to a message part in the wsdl:message. This wsdl:message corresponds to the wsdl:input element for the mapped wsdl:operation. Each message part has a name attribute that is mapped based on the name of the Java parameter and a type attribute (an XML data type)"
    ...and the example the shown further down in that section of the JAX-RPC spec re-inforces this opinion.
    The generated code works with the current version of JAX-RPC and xrpcc, that is not the problem. There is a bigger issue with this situation, since you
    cannot (and should not) assume that a web service (even if generated with JAX-RPC) will be invoked by a client that was generated with JAX-RPC tools.
    The problem is really evident when you don't use JAX-RPC to talk to a JAX-RPC generated service, since you have to use these funny names like String_1, Double_3 which have no application context semantics and thus will invariably lead to some really subtle bugs in remote calls.
    We have used JAX-RPC to generate our server side web service in the normal manner. However, our client is running on an embedded Java (CLDC/MIDP
    level device....on an aJile Java chip in fact) where the JAX-RPC footprint is way too massive for the confines of the MIDP/CLDC platform. So we are using the Enhydra kSoap API and libraries on the client end to invoke the back end JAX-RPC service. This works fine by the way! We have successfully invoked JAX-RPC wrapped services from the embedded Java platform. The
    difficulty stems from the fact that the kSOAP api (and others) require you to bind the values of the parameters for the SOAP invocation by using the WSDL <part> name, and so these funny type-based names become visible in your client application code. Ouch!
    For example, my kSOAP calls to invoke our JAX-RPC service look like this (where request is a SOAP web services request using the kSOAP API's):
    request.addProperty ( "String_1", "SaJe314159" );
    request.addProperty ( "Double_2", pvt.getLatitude() );
    request.addProperty ( "Double_3", pvt.getLongitude() );
    request.addProperty ( "Double_4", pvt.getBearing().floatValue() ) );
    request.addProperty ( "Double_5", pvt.getVelocity() );Whereas it should really look like the following, based on our interface definitions:
    request.addProperty ( "senderID", "SaJe314159" );
    request.addProperty ( "latitude", pvt.getLatitude() );
    request.addProperty ( "longitude, pvt.getLongitude() );
    request.addProperty ( "bearing", pvt.getBearing().floatValue() ) );
    request.addProperty ( "velocity", pvt.getVelocity() );The problem is that xrpcc generates the names as in the first example (String_1, Double_2) instead of using the parameter names (eg. "senderID, latitude).
    We can work around this in two ways for now: 1) use the type-based generated name labels for the moment, or 2) go into the xrpcc generated stub code and WSDL and make manual changes. In the longer term, I'm sure you appreciate why either of these workarounds are not acceptable.
    Based on the above, I think that there is a bug/flaw in this version of xrpcc (it's using a parameter type rather than a parameter name to generate the <message>/<part> element in the WSDL (and of course in the generated stubs and such).
    Thoughts? Fix in EA2 perhaps?
    Thanks!
    ....Andrzej

    I've got the same problem. I edited the WSDL and regenerated both Server and Client classes and it then didn't work. Forget the error but it seemed to have incorrectly capitalised a letter in a class/method name.
    I am trying to define a common WSDL doc that our suppliers must conform to when providing us with a web service. My aim is that the common WSDL will be OK for both Java-based web services and .NET based web services. I have succeeded in this task apart from the method parameter name issue. .NET (of course) does it correctly, and its WSDL correctly names the method parameters. However Java Web Services via xrpcc produce this ridiculous String_1, String_2 etc which bear no relation to the method parameters. I cannot very well go to our suppliers who are using .NET and demand that their method/function parameters are named String_1, String_2 - and wouldn't Bill be pleased with my excuse that I'm trying to get equivalence with the deficiencies of Java ?

  • JWSDP 1.4, JAX-RPC, wscompile, http proxies

    I have a JAX-RPC client that works properly. However, I'm trying to modify the client so that RPC calls can go through an http proxy prior to reaching the web service.
    Here are some of the problems I'm experiencing:
    There are posts on this site, and elsewhere on the net, stating that the wscompile -httpproxy:host:port option can be used to provide this solution. However, wscompile generates the same exact code - whether the httpproxy option is used or not. Is this a problem in JWSDP 1.4?
    There are also posts that state to use properties, such as http.proxyHost or proxyHost. I've used several versions of this solution (while using a sniffer to verify network activity), but all that happens is that the code continues to call directly to the web service - not the http proxy. Makes me think these properties are only useful when using http directly. Many of the posts I've seen regarding this are two years old, and I've seen at least three different opinions on how the property strings should be named. Anybody know the real solution?

    For me these system properties do work:
    proxyHost, proxyPort (maybe also http.proxyHost, http.proxyPort) for Http
    https.proxyHost, https.proxyPort for Https
    The nice thing is that from a WebStart application or the plug-in these properties are set automatically from the browser configuration if not reconfigured manually.

  • JAX-RPC Client Handler

    Hi All,
    I am trying to get a simple example client handler to work using JAX-RPC DII.
    The web serivice is a simple one that just returns Hello + name..
    Here is the client code:
    public class Main {
         * @param args the command line arguments
        private static String BODY_NAMESPACE_VALUE = "http://helloservice/";
        private static String NS_XSD = "http://www.w3.org/2001/XMLSchema";
        private static String ENCODING_STYLE_PROPERTY = "javax.xml.rpc.encodingstyle.namespace.uri";
        private static String URI_ENCODING ="http://schemas.xmlsoap.org/soap/encoding/";
        public static void main(String[] args) {
            try {
                     String url ="http://localhost:8080/HelloService/MyHelloService";
                     QName serviceName   = new QName(BODY_NAMESPACE_VALUE,"MyHelloServiceService");
                     QName portTypeName = new QName(BODY_NAMESPACE_VALUE, "MyHelloServicePort");
                     ServiceFactory factory = ServiceFactory.newInstance();
                     Service service = factory.createService(serviceName);
                     Call call = service.createCall();
                     call.setPortTypeName(portTypeName);
                     call.setOperationName(new QName(BODY_NAMESPACE_VALUE, "sayHello"));
                     call.setTargetEndpointAddress(url);
                     call.setProperty(ENCODING_STYLE_PROPERTY,"");
                     //call.setProperty(ENCODING_STYLE_PROPERTY,URI_ENCODING);
                     call.setProperty(Call.OPERATION_STYLE_PROPERTY, "rpc");
                     QName QNAME_TYPE_STRING = new QName(NS_XSD, "string");
                     call.setReturnType(QNAME_TYPE_STRING);
                     call.addParameter("name", QNAME_TYPE_STRING, ParameterMode.IN);
                     String[] params = { "Murph!" };
                     HandlerRegistry hr = service.getHandlerRegistry();
                     List<HandlerInfo> list = new ArrayList<HandlerInfo>();
                     HandlerInfo hi = new HandlerInfo(ClientSOAPHandler1.class, null,null);
                     list.add(hi);
                     HandlerInfo hi2 = new HandlerInfo(ClientLogicalHandler1.class, null,null);
                     list.add(hi2);
                     hr.setHandlerChain(portTypeName, list);
                     String result = (String)call.invoke(params);
                     System.out.println(result);
            } catch (ServiceException e)
                e.printStackTrace();
            catch (RemoteException e)
                e.printStackTrace();
    }And the code for the Handlers:
    public class ClientSOAPHandler1 extends ClientSOAPHandlerBase
        private final String HANDLERNAME="ClientSOAPHandler1";
        public ClientSOAPHandler1(){
           super();
           super.setHandlerName(HANDLERNAME);
    import javax.xml.transform.Source;
    import java.util.Set;
    import java.util.TreeSet;
    import javax.annotation.PreDestroy;
    import javax.annotation.PostConstruct;
    import javax.xml.namespace.QName;
    import javax.xml.ws.handler.MessageContext;
    import javax.xml.ws.handler.soap.SOAPHandler;
    import javax.xml.ws.handler.soap.SOAPMessageContext;
    import javax.xml.soap.SOAPMessage;
    import java.io.ByteArrayOutputStream;
    public class ClientSOAPHandlerBase implements SOAPHandler<SOAPMessageContext>
        private String handlerName=null;
        public void setHandlerName(String h) {
            this.handlerName=h;
        public String getHandlerName() {
            return this.handlerName;
        @PostConstruct
        public void myInit() {
            System.out.println("------------------------------------");
            System.out.println("in "+handlerName+":myInit");
            System.out.println("exiting "+handlerName+":myInit");
            System.out.println("------------------------------------");
        @PreDestroy
        public void myDestroy() {
            System.out.println("------------------------------------");
            System.out.println("in "+handlerName+":myDestroy");
            System.out.println("exiting "+handlerName+":myDestroy");
            System.out.println("------------------------------------");
        public Set<QName> getHeaders() {
            return new TreeSet<QName>();
        public boolean handleMessage(SOAPMessageContext context) {
            System.out.println("------------------------------------");
            System.out.println("in "+handlerName+":handleMessage");
            boolean direction= ((Boolean)context.get(SOAPMessageContext.MESSAGE_OUTBOUND_PROPERTY)).booleanValue();
            if (direction) {
                System.out.println("direction = outbound");
            } else {
                System.out.println("direction = inbound");
            dumpMsg(context);
            System.out.println("exiting "+handlerName+":handleMessage");
            System.out.println("------------------------------------");
            return true;
        public void close(MessageContext context) {
            System.out.println("------------------------------------");
            System.out.println("in "+handlerName+":close");
            System.out.println("exiting "+handlerName+":close");
            System.out.println("------------------------------------");
        public boolean handleFault(SOAPMessageContext context) {
            System.out.println("------------------------------------");
            System.out.println("in "+handlerName+":handleFault");
            System.out.println("exiting "+handlerName+":handleFault");
            System.out.println("------------------------------------");
            return true;
        public void dumpMsg(MessageContext context) {
           try {
              SOAPMessage soapmsg = ((SOAPMessageContext)context).getMessage();
              System.out.println("MSG="+getMsgAsString(soapmsg));
           } catch (Exception e) {
               e.printStackTrace();
           return;
        public String getMsgAsString(SOAPMessage message) {
            String msg  = null;
            try {
                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                message.writeTo(baos);
                msg = baos.toString();
            } catch (Exception e) {
                e.printStackTrace();
            return msg;
    }The output is as follows:
    run:
    Hello Murph!
    BUILD SUCCESSFUL (total time: 1 second)
    This should print out the various println statements in the Handler, but it doesnt :(- How come? What am I missing?
    I have searched everywhere trying to find the proper way to get a client side handler to work and have had luck. Additionally, I really really need this to work....if anyone could provide help, it would be VERY appreciated...pretty please
    Thanks,
    Daniel

    Any Ideas Anyone?????

  • Calling One Jax RPC Web Service from another in Oracle AS 10.1.3

    We have a number of services residing in the same Oracle 10.1.3 app server container. These are deployed as Jax RPC Web Services
    I am trying to figure out what are the different options to have once web service invoke an operation on another (without directly linking to the Java code). The reason we want to keep separation as far as possible is that these services may later migrate to different app servers and in the spirit of SOA all we want to change when a service migrates is address and would like everything else to remain the same.
    So for example, if Web Service A needs to invoke an operation X in web service B,
    One way to do this seems to be to generate a proxy for web service B, include the proxy in Web Service A and then simply do B.X() from Web Service A.
    Is this is the best way to do it ?
    Are there other alternative approaches available ? Such as using the built in ESB features of Oracle App Server 10.1.3?
    Any pointers will be greatly appreciated.
    Thanks
    RR

    Found document of 10.1.3.1.0 how to Creating a Custom Identity Service Plug-in
    Oracle® BPEL Process Manager Administrator's Guide
    10g (10.1.3.1.0)
    Part Number B28982-03
    http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28982/plugin.htm
    But may be no help.

  • How to use user-defined packages in JAX-RPC web service

    I am trying to use Object of my class located in my package in jax-rpc webservice,the code is
    package supercomputer;
    import Hello.*;
    public class SuperImpl implements SuperIF
    public String sendParam(String data)
    Temp ob=new Temp();
    int i=ob.get1(10000);
    return data+"returned by supercomputer";
    Temp is located in Hello package,I have jar the Hello package as Hello.jar and has set its classpath in targets.xml of Ant tool.
    The code compiles well and service is deployed successfully,but when i try to call the service from the client its gives me following error.
    [echo] Running the supercomputer.SuperClient program....
    [java] java.rmi.ServerException: Missing port information
    [java] at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:357)
    [java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:228)
    [java] at supercomputer.SuperIF_Stub.sendParam(SuperIF_Stub.java:60)
    [java] at supercomputer.SuperClient.main(Unknown Source)
    I dont know if it deploys why it gives error on client side.
    Please tell how to use user-defined packages and class in jax-rpc service code ,i am not talking about passing user-defined parameters i am just talking about making objects of user defined classes in jax-rpc service.I think there is some problem in classpath.
    Please guide me in doing that.
    Thanks,
    Farrukh

    Farrukh,
    I don't know if your error is about a missing class from your custom package, ... what track did you followed to say that?
    To use your package in the implementation of you web service, you should only follow the rules of making a web application: put your package jar in your \lib directory inside WEB-INF/ or your package classes unjared in classes (also in WEB-INF/).
    As I already said, I have doubts that your error should be originated from a missing class from your package, but:
    -try to see the logs (errors?) when you deploy your web service that could give a hint about the problem.
    -try to see if you can access your endpoint through your browser to see if there is a online status
    -display your config/WSDL file, and the steps you did to build your web service.
    regards,
    Pedro Salazar.

  • URGENT **** Need help for JAX-RPC Web Service Proxy deploy to OC4J 10.1.3.5

    Hi everyone!
    I’m really new to web services.
    I’m getting a *500 internal server error* while deploying my JAX-RPC web service Proxy to an Oracle AS, in an OC4J, v. 10.1.3.5.0.
    Running my client from my development environment (*jdeveloper 10g, 10.1.3.5.0*) everything functions correctly: from jdeveloper I can contact and use the web service defined by the following endpoint: https://www.medialibrary.it/services/federaMLOL.asmx?WSDL
    I created a "try_ws_client.jsp" file that runs correctly from my local development environment jdeveloper (that uses an embedded oc4j, v. 10.1.3.5.0) but fails when run from the test server (Oracle AS, in an OC4J, v. 10.1.3.5.0), getting, as I mentioned a 500 internal server error, a white page in IE but with FF the message says: The’s an error in the servlet .....
    Here's how I created the ws proxy and how I’m using it to consume the ws I mentioned.
    1. I used the jdeveloper “Create Web Service Proxy” wizard (File > New > Business Tier > Web Services > Web Service Prox) and in the WSDL document URL I put: https://www.medialibrary.it/services/federaMLOL.asmx?WSDL
    2. The operation ended without adding nothing to the web.xml file and creating the proxy files. One of them is: FederaMLOLSoapClient.java that have the WS exposed methods (es: public boolean createUser(String) ) + a “main” method with the example how to use this client to consume the WS.
    public static void main(String[] args) {
    try {
    it.reggiocity.provincia.mlol.proxy.FederaMLOLSoapClient myPort = new it.reggiocity.provincia.mlol.proxy.FederaMLOLSoapClient();
    System.out.println("calling " + myPort.getEndpoint());
    // Add your own code here
    } catch (Exception ex) {
    ex.printStackTrace();
    3. In FederaMLOLSoapClient.java I’ve create the method "tyIt":
    public String tryIt(String username) {
    try {
    it.reggiocity.provincia.mlol.proxy.FederaMLOLSoapClient myPort = new it.reggiocity.provincia.mlol.proxy.FederaMLOLSoapClient();
    if(myPort.createUser(String username)) {
    return “O.K”;
    } else {
    return “K.O”;
    } catch (Exception ex) {
    // logs error
    4. I created my try_ws_client.jsp file that creates FederaMLOLSoapClient object and calls the tryIt method, printing the “OK” or “KO” message.
    <%@ page import="it.reggiocity.provincia.biblioreggiane.*"%>
    <%
    String message = "";
    FederaMLOLSoapClient obj= new FederaMLOLSoapClient( );
    message = obj.tryIt(“AAAAAA70R10H226H”);
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
    <title>prova</title>
    </head>
    <body><%=message%></body>
    </html>
    The situation is:
    My try_ws_client.jsp runs correctly from my jdeveloper and the user is created while creating app.ear and deploying it to my Oracle AS/OC4J as mentioned above, I get a 500 Internal Server Error.
    Any idea to find a solution to this problem?
    Please help.
    Take care.
    John M.

    Hi,
    you want to build the Web Service, or you want to consume the Service as a client? If the latter, Web client (ADF?) or Java client?
    Frank

  • Attachments using JAX - RPC

    I am using JAX - RPC for attachemnts using jwsdp-1.2. I am using DataHandler for attachments. I have been able to deploy the web service but when I try to connect to web service using client, I get following error. ny help will be greatly appreciated
    serialization error: java.lang.NullPointerException
    at com.sun.xml.rpc.encoding.AttachmentSerializer.serializeAsAttachment(AttachmentSerializer.java:120)
    at com.sun.xml.rpc.encoding.AttachmentSerializer.serialize(AttachmentSerializer.java:74)
    at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.serialize(ReferenceableSerializerImpl.java:71)
    at attachments.client.AttachmentExampleAPI_sendDocument_RequestStruct_SOAPSerializer.doSerializeInstance(AttachmentExampleAPI_sendDocument_RequestStruct_SOAPSerializer.java:88)
    and more lines of error.
    Below is my client and webservice code :
    CLIENT
    FileDataSource fs = new FileDataSource("abc.txt");
    DataHandler dhSource = new DataHandler(fs);
    AttachmentExampleAPI up = new TestService_Impl().getAttachmentExampleAPIPort();
    up.sendDocument("properties", dhSource));
    WEBSERVICE CODE
    public void sendDocument(String name, DataHandler dh) throws java.rmi.RemoteException {
    DataSource ds = rdh.getDataSource();
    dh.writeTo(new FileOutputStream("abc.txt" ));
    Any help regarding the error will be great.

    Not sure exactly what the problem is but i have sent attachements successfully from the server to client using:
    SERVER method:
    public javax.activation.DataHandler getAudioMIMEAttachment(java.lang.String in0, java.lang.String in1) throws java.rmi.RemoteException {
    String inputFilename = null;
    String inputFormat = null;               
    inputFilename = "C:\\wav\\" + in0 + "." + in1;
    System.out.println("You have requested the following file: " + inputFilename);
    //create a new DataHandler object for the file contents
    DataHandler dh = new DataHandler(new FileDataSource(new File(inputFilename)));
    return dh;                    
    Chunks from client code:
    StreamingMultimediaSoapBindingStub stub = null;
    try
    stub = (StreamingMultimediaSoapBindingStub)(new StreamingDemoServiceLocator().getPort(StreamingMultimediaSoapBindingStub.class));
    catch (javax.xml.rpc.ServiceException jre) {
    System.err.println("Could not get client stub.");
    jre.printStackTrace();
    //call for binary DataHandler attachment
    if(stub != null)
    try
    dh = stub.getAudioMIMEAttachment("long", "wav");                                   
    catch (java.rmi.RemoteException re) {
    System.err.println("Error whilst calling method on client stub.");
    re.printStackTrace();                                   
    Well, hope it helps
    regards
    Paul

Maybe you are looking for

  • Share buttons disappear at every restart

    Since 2 days at every iMac restar share buttons in notification center are missing. I think it's due to mavericks update. Things I tried: - ensure facebook/twitter accounts are properly enabled - share buttons in notification center are properly enab

  • [ADF-11.1.2] Proof of view performance tuning in oracle adf

    Hello, Take an example of : http://www.gebs.ro/blog/oracle/adf-view-object-performance-tuning-analysis/ It tells me perfectly how to tune VO to achieve performance, but how to see it working ? For example: I Set Fetch size of 25, 'in Batch of' set to

  • When using external editor, iPhoto does not re-import the .psd file

    Hi, I've just started using Photoshop Elements 6 as a more advanced editor in iPhoto. When I do the 'External Edits' wihtout adding layers etc. and re-save as a JPEG then the photo will re-appear in iPhoto as the edited file. However if I do the exte

  • My iPod Touch 5 won't Charge?

    For some reason, my iPod won't charge, I do intend to call Apple for support but I may aswell get help before I do. My iPod charger was working perfectly fine during last week, but ever since yestreday, when my iPod went out of charge, my iPod wouldn

  • HT201328 how to unlock my i phone so i can use it international

    how to unlock my iphone so i can use it international on any simcard