WL 8.1 and JAX-RPC 1.1 (JWSDP 1.3) problems

I have developed several web services using Sun's JWSDP 1.3. It deploys just fine
in WebLogic 8.1 and I can view the WSDL, etc. with no problems. I have written
a simple test client to call the service and this is where I get errors.
The server error is:
Apr 14, 2004 9:43:00 AM com.sun.xml.rpc.server.http.JAXRPCServletDelegate doPost
SEVERE: caught throwable
java.lang.NoSuchMethodError: javax.xml.soap.SOAPElement.normalize()V
at com.sun.xml.rpc.streaming.XmlTreeReader.parse(XmlTreeReader.java:129)
at com.sun.xml.rpc.streaming.XmlTreeReader.next(XmlTreeReader.java:100)
at com.sun.xml.rpc.streaming.XMLReaderBase.nextContent(XMLReaderBase.jav
a:24)
at com.sun.xml.rpc.streaming.XMLReaderBase.nextElementContent(XMLReaderB
ase.java:42)
at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:
108)
at com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServle
tDelegate.java:316)
at com.sun.xml.rpc.server.http.JAXRPCServlet.doPost(JAXRPCServlet.java:6
9)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
The client error is:
java.rmi.ServerException: JAXRPC.JAXRPCSERVLET.28: Missing port information
     at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:372)
     at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:224)
     at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:61)
     at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:339)
     at com.sun.xml.rpc.client.dii.CallInvocationHandler.doCall(CallInvocationHandler.java:99)
     at com.sun.xml.rpc.client.dii.CallInvocationHandler.invoke(CallInvocationHandler.java:71)
     at $Proxy0.getWorkList(Unknown Source)
     at com.workpoint.sample.client.webservices.WorkItemServiceClient.testGetWorkList(WorkItemServiceClient.java:124)
     at com.workpoint.sample.client.webservices.WorkItemServiceClient.main(WorkItemServiceClient.java:48)
I have a WAR for the web services that also includes the JAX-RPC, SAAJ, and other
JARs. This WAR is bundled in an EAR with our other applications. Like I said,
everything deploys just fine, it's at runtime the web services don't work. This
configuration (and test client) works with Tomcat, JBoss, OC4J, and WebSphere
with no problems. I've tried a bunch of different things and can't figure out
why it doesn't work with WebLogic.
Thanks for any help on this.
Mike

David,
I tried your prefer-web-inf-classes and the web services deploy, but i get an
error trying to view the wsdl. sounds like trying to get jax-rpc 1.1 web services
running in weblogic is going to be nothing but problems. anyways, here's the error
i get:
Error 500--Internal Server Error
javax.servlet.ServletException: JAXRPC.JAXRPCSERVLET.35: failed to create a template
object
     at com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doGetDefault(JAXRPCServletDelegate.java:258)
     at com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doGet(JAXRPCServletDelegate.java:102)
     at com.sun.xml.rpc.server.http.JAXRPCServlet.doGet(JAXRPCServlet.java:76)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
     at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
     at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
     at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
     at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
     at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
"David Karr" <[email protected]> wrote:
>
This is happening because WLS already contains the JWSDP classes, but
an older
release. The jars in your web applications are not used if other jars
containing
those classes are found first.
Technically, you should be able to set the "prefer-web-inf-classes" parameter
in your weblogic.xml file to make it "prefer" classes found in WEB-INF.
There's
one not very well documented aspect of this that would be a problem for
trying
to override particular classes, but it shouldn't be a problem for your
case. The
issue is that the ClassLoader that ends up being used if you set "prefer-web-inf-classes"
(it might not be a different ClassLoader, but just imbued with modified
behavior)
actually does not allow classes in certain packages to be overridden.
I can't
remember all of the paths, but I do know that anything in "javax.xml.*"
is specifically
ALLOWED to be overridden.
However, when I went down this path a while ago, I ran into other more
obscure
exceptions that i was unable to figure out. I ended up concluding that
using the
JWSDP included with WLS 8.1 was the path of least resistance. I never
did try
altering the global classpath of the appserver to include the jwsdp 1.3
jars to
override the classes in weblogic. This is another alternate approach,
but I have
a feeling that this will cause other unexpected problems.
"Mike" <[email protected]> wrote:
I have developed several web services using Sun's JWSDP 1.3. It deploys
just fine
in WebLogic 8.1 and I can view the WSDL, etc. with no problems. I have
written
a simple test client to call the service and this is where I get errors.
The server error is:
Apr 14, 2004 9:43:00 AM com.sun.xml.rpc.server.http.JAXRPCServletDelegate
doPost
SEVERE: caught throwable
java.lang.NoSuchMethodError: javax.xml.soap.SOAPElement.normalize()V
at com.sun.xml.rpc.streaming.XmlTreeReader.parse(XmlTreeReader.java:129)
at com.sun.xml.rpc.streaming.XmlTreeReader.next(XmlTreeReader.java:100)
at com.sun.xml.rpc.streaming.XMLReaderBase.nextContent(XMLReaderBase.jav
a:24)
at com.sun.xml.rpc.streaming.XMLReaderBase.nextElementContent(XMLReaderB
ase.java:42)
at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:
108)
at com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServle
tDelegate.java:316)
at com.sun.xml.rpc.server.http.JAXRPCServlet.doPost(JAXRPCServlet.java:6
9)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
The client error is:
java.rmi.ServerException: JAXRPC.JAXRPCSERVLET.28: Missing port information
     at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:372)
     at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:224)
     at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:61)
     at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:339)
     at com.sun.xml.rpc.client.dii.CallInvocationHandler.doCall(CallInvocationHandler.java:99)
     at com.sun.xml.rpc.client.dii.CallInvocationHandler.invoke(CallInvocationHandler.java:71)
     at $Proxy0.getWorkList(Unknown Source)
     at com.workpoint.sample.client.webservices.WorkItemServiceClient.testGetWorkList(WorkItemServiceClient.java:124)
     at com.workpoint.sample.client.webservices.WorkItemServiceClient.main(WorkItemServiceClient.java:48)
I have a WAR for the web services that also includes the JAX-RPC, SAAJ,
and other
JARs. This WAR is bundled in an EAR with our other applications. Like
I said,
everything deploys just fine, it's at runtime the web services don't
work. This
configuration (and test client) works with Tomcat, JBoss, OC4J, andWebSphere
with no problems. I've tried a bunch of different things and can't figure
out
why it doesn't work with WebLogic.
Thanks for any help on this.
Mike

Similar Messages

  • What is the difference between RMI and JAX-RPC?

    Dear All
    First of all my understanding of RMI and JAX-RPC:
    RMI is JAVA only version of RPC. It can't talk to any other language.
    JAX-RPC is a part of JWSDP and if you implement your client and server with JAX-RPC, client written in any language can talk with JAX-RPC implementation.
    What else makes them different and am I right with my understanding?
    Finally, I would like to develop clients which will have a java class, say httpserver.java, which will act like a http server, listens to a http port. Now, Two such client will run in two different PC and I want to call a module from one client to another which should be accessible via my httpserver.java. For that which should be my choice RMI or JAX-RPC? Can I achive it with http get-post method, as I am expecting to read some value of variables from one client to the another.
    Say class A has variable a, aa, aaa and clas B has variable b, bb, bbb. Now I want to read the value of b, bb, bbb from class A. How do I do that when class B is listening to a http port with my httpserver.java class.
    Lastly, say B is listening to a http port and I want to send a file to B from A. How can I do that? Remember, B didn�t ask for that. How can A send a file to B when B is listening to a http port with my httpserver.java.
    With regards
    Mohammed Jubaer Arif
    Mobile: +61-0411215302
    Personal Web: http://www.geocities.com/jubairarifctg/
    Org. Web.: http://www.geocities.com/halimschamber/

    simply put, RMI allows you to (semi) transparently treat remote objects as if they were local, and your distributed application can be written (more or less) like a "normal" java app. Sockets just give you a "raw" connection to work with, and you get to build up your application from that.
    I hope that helped
    Lee

  • Problems with J2ME and JAX-RPC

    Hi,
    I am trying to write a J2ME web service client. I have generated the stub classes with wscompile from the wsdl document at http://www.webservicex.net/stockquote.asmx?WSDL. However, when I try to run the MIDlet I always get the following error message:
    [wtkpreverify] Error preverifying class javax.xml.rpc.encoding.Serializer
    [wtkpreverify] java/lang/NoClassDefFoundError: java/io/Serializable
    I am using Eclipse 3.1, Antenna 0.9.13, the Web Service Development Kit 2.0 and the WTK 2.3 beta.
    The necessary jars (the WTK libs, rt.jar from the JRE, activation, mail, saaj and jax-rpc libraries from the WSDK) have been included in my classpath.
    Does anybody know how to fix this problem? Any help is much appreciated.
    Regards,
    Motivated

    Thanks, that was my mistake.
    Instead of using wscompile, you must generate the stub classes with the WTK. Then, you set a reference to the j2me-ws.jar (JSR-172). No additional libraries from the Web Service Development Kit are required.

  • EJB 3.0 and JAX-RPC 1.1 Not Working Together

    I've came across a strange behavior when building a JAX-RPC 1.1 service in WebLogic 10 on top of a EJB 3.0 bean:
    Business Interface
    @Remote
    @WebService(targetNamespace="http://coronelado.sf.net")
    public interface AuthenticationBO {
      boolean login(String email, String password) throws AuthenticationBOException;
    Bean
    @Stateless(name="AuthenticationBO")
    @TransactionManagement(BEAN)
    @WLHttpTransport(contextPath="coronelado-service", serviceUri="AuthenticationBOService")
    @WebService(endpointInterface="net.sf.coronelado.business.AuthenticationBO")
    public class AuthenticationBOBean implements AuthenticationBO {
    ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" version="3.0">
      <enterprise-beans>
        <session>
          <ejb-name>AuthenticationBO</ejb-name>
          <service-endpoint>net.sf.coronelado.business.AuthenticationBO</service-endpoint>
        </session>
      </enterprise-beans>
    </ejb-jar>After I deploy the bean, two web services, not one, are listed in the console: AuthenticationBOService and AuthenticationBOBeanService (a duplicate), and the following error message is printed:
    [JAM] Warning: failed to resolve class net.sf.coronelado.business.AuthenticationBOBeanAm I missing something here?

    http://fernandoribeiro.eti.br/2007/06/27/bug-in-weblogic-10-web-services/

  • 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.

  • 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

  • OC4j and JAX-RPC Web service.

    Hello every one,
    this is actually coming from :
    OC4j 9.0.3 CMP/CMR and MVCSoft.
    Is it possible to develope JAX-RPC webservice using sun jdk with OC4J ?
    How can I do it ?
    Thanks.
    Giuseppe.

    Hi,
    I should have said that:
    I'm stuck with 9.0.3 as the 10.0.3 is a preview
    and the final release is not available until
    next summer.
    I guess 10.0.3 should be better as it is compliant with J2EE 1.4 which should include JAXRPC support.
    The problem with 9.0.3 is that being compliant with J2EE 1.3 it does not directly support JAX-RPC.
    So I was wondering How to develop Jax-RPC web service using OC4J 9.0.3.
    Sorry for to having specified the version.
    Thanks.
    Giuseppe.

  • Web Services with REST, SOAP and  JAX-RPC

    Hi,
    Can somebody who has developed web services extensively comment/suggest a java development environment that works best for developing web services mainly with REST. I've found that Eclipse with Axis2 and Tomcat works well. But I would like to get your opinion on it and some other alternatives.

    Hi,
    Please help me its urgent.
    can u give me a detail example how to do Web services
    with REST.
    Here is my id [email protected]
    Thanks in advance.You can do this in many ways. It depends on how heavy your service is. You can write a simple servlet that will take a REST (I'm assuming you know what REST is) request and parses it out, calls a server-side method and generates a REST response.
    Another way is to use a web-service container such as AXIS. You can read some examples and documentation on their website. AXIS2 has REST support as well.

  • JAX-RPC and DataHandler

    Sorry, I know there has been lots of discussion about sending files with JAX-RPC in this forum, but I haven't found any answers to my problem.
    I got the impression that all I needed to do was to write a service having a DataHandler as a method parameter or a return type and JAX-RPC would automatically send it as attachment, but all I got was this error message:
    no serializer is registered for (class javax.activation.DataHandler, {http://java.sun.com/jax-rpc-ri/internal}datahandler)
    So what else I need to do to get this working? Is there any documentation explaining this, at least the Java Web Services Tutorial doesn't event mention the possibility of sending files.
    Heikki

    You can use DataHandler classes to add files to your web service messages. You would need to create a client side DataHandler and a server side DataHandler. The Web Service Tutorial doesn't say DataHandler but it is mentioned. Look at the web service tutorial for web service pack 1.3. Chapter 12 --> Advanced JAX-RPC Examples --> SOAP Message Handlers Example.
    The basic jist is you manually manipulate the soap message going back and forth.

  • 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

  • SAAJ  vs JAX-RPC

    Hi Team,
    Whats the differences implementing web service clients  using SAAJ and JAX-RPC ?
    Do we have any performance related differences between these two ?
    If I am not worng, SAAJ dynamic way of calling web services which means that it will create SOAP message on fly for every request.
    So SAAJ  may take more time comapred to implementing the clients using JAX-RPC.
    Please correct me if my assumption is wrong.
    Thanks,Anil
    Edited by: Anilkumar Vippagunta on Jan 29, 2008 1:50 AM
    Edited by: Anilkumar Vippagunta on Jan 29, 2008 1:50 AM

    Hi Anil
    For more details have  alook on these links
    http://help.sap.com/saphelp_nw04/helpdata/en/d6/f9bc3d52f39d33e10000000a11405a/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0bbd890-0201-0010-51bd-97029689f44b
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f98c731d-0e01-0010-dfa5-dfb8f49dac6e
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ede71ec7-0701-0010-c08c-e284d530f384
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3b28e590-0201-0010-968f-e10ed5328191
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/90a5266f-f721-2a10-7fb1-cefceb106ecf
    Regds
    Abhishek

  • OC4J 9.0.4, JAX-RPC, AXIS Client Stub

    Hi All,
    I have hit a problem and am wondering if anybody has any pointers :
    * I have a Webservice running on OC4J 10.1.2 Standalone.
    * I have generated Java client stubs by pointing to this webservice using the wsdl2java tool from Apache Axis and can use these generated classes without any problems outside any web containers.
    * I have created a jsp that calls these classes and can run this within the embedded server of Jdeveloper 9.0.5.2
    However...
    When I deploy the ear file containing this jsp into a 9.0.4 OC4J standalone / or full install and run the same jsp I am getting the following exception :
    500 Internal Server Error
    java.lang.ClassFormatError: com/abc/mypackage/MyApplicationBindingStub (Illegal Field name "array$[B")
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
         at com.evermind[com Application Server Containers for J2EE 10g (9.0.4.0.0)].util.OC4JSecureClassLoader.defineClassEntry(OC4JSecureClassLoader.java:172)
         at com.evermind[com Application Server Containers for J2EE 10g (9.0.4.0.0)].naming.ContextClassLoader.defineClass(ContextClassLoader.java:1154)
         at com.evermind[com Application Server Containers for J2EE 10g (9.0.4.0.0)].naming.ContextClassLoader.findClass(ContextClassLoader.java:390)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
         at com.evermind[com Application Server Containers for J2EE 10g (9.0.4.0.0)].naming.ContextClassLoader.loadClass(ContextClassLoader.java:138)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
         at com.abc.mypackage.MyApplication_ServiceLocator.getMyApplicationPort(MyApplication_ServiceLocator.java:55)
         at com.abc.mypackage.MyApplication_ServiceLocator.getMyApplicationPort(MyApplication_ServiceLocator.java:50)
         at _Headers._jspService(_Headers.java:81)
         [SRC:/Headers.jsp:40]
         at com.orionserver[com Application Server Containers for J2EE 10g (9.0.4.0.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at com.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349)
         at com.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at com.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[com Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
         at com.evermind[com Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind[com Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind[com Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind[com Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind[com Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:536)
    Can anybody let me know what I need to do. Is there anyway that I can get this Apache client code (which uses jax-rpc) working within OC4J 9.0.4. I know the limitations of 9.0.4 and Jax-rpc - but I am wondering if anybody has a nice note to work around it.
    Any help or comments would be greatly appreciated.

    Richard, the error message you see below indicates that the JVM can not recognize your class file.
    java.lang.ClassFormatError: com/abc/mypackage/MyApplicationBindingStub (Illegal Field name "array$[B")
    Are you using different java version to run wsdljava and OC4J? Can you try using the same version of java for both of them?

  • 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.

  • JAX-RPC or JAXM or AXIS/GLUE

    Hello,
    I am starting with webservices and am confused with all the APIs out there. Should I start with JAX-RPC or JAXM to develop/consume webservices? Do I need SOAP implementations like AXIS or GLUE?
    Please Help !!!
    -ss

    Yes, it's pretty overwhelming when you're first starting out. My suggestion is to start with JAX-RPC because:
    1. it's easy to understand
    2. most existing web services are RPC-based
    3. there are many nice tools to help you create JAX-RPC based services
    Now you can decide which JAX-RPC implementation to use. Both JWSDP and Axis have JAX-RPC implementations. JWSDP is nice everything-rolled-into-one installation, so it's a good platform for learning (the tutorial version 1.2 isn't available yet but most of the 1.1 tutorial applies to JWSDP 1.2). Just download the JWSDP 1.2 installation package and the tutorial and you're ready to go (Tomcat is bundled with the JWSDP).
    However, I believe that many more commercial web service implementations are based on Axis than JWSDP. If you plan on deploying web services yourself, you may want familiarize yourself with Axis. Just download and install Tomcat, then download and install Axis. The axis-user mailing list at http://ws.apache.org/axis/mail.html is very helpful.
    And don't worry too much about which package is better. Any services you develop with either platform can be ported unchanged to the other.
    Good luck,
    Mike

  • JAX-RPC: Web service where both server /and/ client are services?

    I'm considering a two-way Web service in an application that I'm designing and would appreciate any insight from prior experience.
    This will be a standard client-server application, where the server broadcasts messages and the client, in turn, can request further information about the messages that it receives (think RSS-style updates, but with more interaction). [strong]However[strong], instead of having the client poll the server for new messages, I'd like to have the client register itself with the server as a message listener. The server is currently implemented as a Web service on port X. I'd like the client to register itself with the server, and then receive messages on port Y.
    I'm considering a design like the following (note the directions of the inheritance arrows):
    ( Server class )  --<-- ( RemoteServerImpl class ) -->-- / RemoteServer interface /
           |
    ( Listener class ) --<-- ( RemoteListenerImpl class ) -->-- / RemoteListener interface /Some considerations:
    * In both cases, the client and server are broken out into an interface and two classes. The non-Remote classes implement all of the functionality. The RemoteX interfaces declare the methods that will be exposed via RPC, and the RemoteXImpl classes are empty subclasses of the non-Remote classes.
    * In order to register itself with the Server, the Listener must be passed in as a method parameter, and thus conform to the JAX-RPC specification for value types. However, value types can't implement java.rmi.Remote.
    * Only the Server and Listener know anything about each other.
    * This application can be run either remotely or locally, depending on how the Server and Listener are instantiated. For the latter, they're instantiated directly and the listener is registered with the Server. For the latter, the RemoteX interfaces will point to the service stubs.
    * I don't see an easy way to allow both the Server and the Listener to have references to each other (at least now without some casting magic), since one of them will have to conform to the value type specification, which requires that all of its fields must be valid JAX-RPC types.
    I've got the Server portions implemented and working, and am now going to turn to the Listener stuff. Can anybody see a fundamental problem with this design, or can suggest something better?

    Hi There,
    Because web services are fundamentally a Services-oriented architecture, and not an Object-oriented one, you are unable to pass objects by reference (only by value) hence the design decision to not allow rmi.Remote objects to be sent across the wire. The best way would be to abstract an object which does itself not represent a server, but a route to a server (lets call it ServerPointer). This must contain address, port, service info, etc.
    Now, in your Server class, create a factory method which takes a ServerPointer, and returns a reference to a
    remote server, e.g. protected Server createServer( ServerPointer p ) (using the necessary APIs to get such a reference)
    Hope this helps...

Maybe you are looking for

  • Error while Driving a view using parameters from other view

    Hi, I have created a report with streamlist and Barchart view.Driving option is used in streamlist to drive the barchart. The driving works well untill i dont use any filters in the Streamlist.Once i use parameters in streamlist , the driving works o

  • EC SALES LIST - Belgique: XML file: Content not accepted in prolog

    Hy tou you all, We've implemented all Ec sales list note oss for Belgium but at the upload in the delcaration vat system the xml file is not accepted : "Content not accepte in prolog"; Did this message encured to you ? Thanks, TF

  • Internal error while compiling a package

    When I update a view within from a pulic procedure the package compiles without any issue. However If I make the same procedure as private(no declartion in specifcation) the package gives an internal error

  • I can,t open the files with my Adobe ID

    I trent change my adobe ID but, i don,tnothing

  • Landed costs

    Hi All, This is a question on landed costs for imported materials. I have created a PO for an item having a value of INR 650, [ex.rate u2013 48/-] qty u201310. I have created landed costs after a/p invoice. I gave freight amt as 20 usd, customs  valu