WLS 11g. Dynamic webservice client. Input is complext type. Output String.

Hi,
I used Webservice annotations to generate a WS (as given in WLS documentation). I am creating a dynamic client but when I invoke the client I get error.
@WebService(name="ErrorHandlerPortType", serviceName="ErrorHandlerService")
public class ErrorHandler {
     @WebMethod()
     public String callErrorHandler(ErrorMessage message) {
          try {
               System.out.println("Producer: " + message.getProducer());
               return "Here is the descirption: '" + message.getErrorDescription() + "'";
          } catch (Exception ex) {
               ex.printStackTrace();
               return "Caught Exception";
public class ErrorMessage implements java.io.Serializable {
     private String consumer;
     private String producer;
     private String errorCode;
     private String errorDescription;
WSLD which got generated.
- <WL5G3N0:definitions name="ErrorHandlerServiceDefinitions" targetNamespace="http://katz/integration/esb/errorhandling/ws" xmlns="" xmlns:WL5G3N0="http://schemas.xmlsoap.org/wsdl/" xmlns:WL5G3N1="http://katz/integration/esb/errorhandling/ws" xmlns:WL5G3N2="http://schemas.xmlsoap.org/wsdl/soap/">
- <WL5G3N0:types>
- <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://katz/integration/esb/errorhandling/ws" xmlns:WL5G3N0="http://schemas.xmlsoap.org/wsdl/" xmlns:WL5G3N1="http://katz/integration/esb/errorhandling/ws" xmlns:WL5G3N2="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="java:katz.integration.esb.errorhandling.datatype" />
- <xs:element name="callErrorHandler">
- <xs:complexType>
- <xs:sequence>
<xs:element name="message" type="java:ErrorMessage" xmlns:java="java:katz.integration.esb.errorhandling.datatype" />
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="callErrorHandlerResponse">
- <xs:complexType>
- <xs:sequence>
<xs:element name="return" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
- <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="java:katz.integration.esb.errorhandling.datatype" xmlns:WL5G3N0="http://schemas.xmlsoap.org/wsdl/" xmlns:WL5G3N1="http://katz/integration/esb/errorhandling/ws" xmlns:WL5G3N2="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xs:complexType name="ErrorMessage">
- <xs:sequence>
<xs:element minOccurs="1" name="Consumer" nillable="true" type="xs:string" />
<xs:element minOccurs="1" name="Producer" nillable="true" type="xs:string" />
<xs:element minOccurs="1" name="ErrorCode" nillable="true" type="xs:string" />
<xs:element minOccurs="1" name="ErrorDescription" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:schema>
</WL5G3N0:types>
- <WL5G3N0:message name="callErrorHandler">
<WL5G3N0:part element="WL5G3N1:callErrorHandler" name="parameters" />
</WL5G3N0:message>
- <WL5G3N0:message name="callErrorHandlerResponse">
<WL5G3N0:part element="WL5G3N1:callErrorHandlerResponse" name="parameters" />
</WL5G3N0:message>
- <WL5G3N0:portType name="ErrorHandlerPortType">
- <WL5G3N0:operation name="callErrorHandler" parameterOrder="parameters">
<WL5G3N0:input message="WL5G3N1:callErrorHandler" />
<WL5G3N0:output message="WL5G3N1:callErrorHandlerResponse" />
</WL5G3N0:operation>
</WL5G3N0:portType>
- <WL5G3N0:binding name="ErrorHandlerServiceSoapBinding" type="WL5G3N1:ErrorHandlerPortType">
<WL5G3N2:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <WL5G3N0:operation name="callErrorHandler">
<WL5G3N2:operation style="document" />
- <WL5G3N0:input>
<WL5G3N2:body parts="parameters" use="literal" />
</WL5G3N0:input>
- <WL5G3N0:output>
<WL5G3N2:body parts="parameters" use="literal" />
</WL5G3N0:output>
</WL5G3N0:operation>
</WL5G3N0:binding>
- <WL5G3N0:service name="ErrorHandlerService">
- <WL5G3N0:port binding="WL5G3N1:ErrorHandlerServiceSoapBinding" name="ErrorHandlerPortTypeSoapPort">
<WL5G3N2:address location="http://127.0.0.1:7100/ErrorHandlingWebservice/ErrorHandler" />
</WL5G3N0:port>
</WL5G3N0:service>
Client Code:
QName serviceName = new QName("http://katz/integration/esb/errorhandling/ws","ErrorHandlerService");
     ServiceFactory factory = ServiceFactory.newInstance();
     Service service = factory.createService(serviceName);
     QName port = new QName(qnamePort);
     Call call = service.createCall();
     QName operationName = new QName("http://katz/integration/esb/errorhandling/ws","callErrorHandler");
call.setOperationName(operationName);
QName messageDatatype = new QName("java:katz.integration.esb.errorhandling.datatype");
call.addParameter("message", messageDatatype, ErrorMessage.class, ParameterMode.IN);
call.setReturnType(XMLType.XSD_STRING);
call.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY,URI_ENCODING);
                    call.setTargetEndpointAddress(endpoint);
                    ErrorMessage errMsg = FormErrorMessage.getMessage("EXCEL", "PMM", "EXL123", "Trial Error Message");
                    System.out.println("Going to invoke......");
                    Object[] params = { errMsg };
                    Double result = (Double)call.invoke(params);
I am getting the error:
javax.xml.rpc.JAXRPCException: failed to invoke operation 'callErrorHandler' due to an error in the soap layer (SAAJ); nested exception is: Message[ failed to serialize class katz.integration.esb.errorhandling.datatype.ErrorMessageweblogic.xml.schema.binding.SerializationException: mapping lookup failure. class=class katz.integration.esb.errorhandling.datatype.ErrorMessage class context=TypedClassContext{schemaType=java:katz.integration.esb.errorhandling.datatype}]StackTrace[
javax.xml.soap.SOAPException: failed to serialize class katz.integration.esb.errorhandling.datatype.ErrorMessageweblogic.xml.schema.binding.SerializationException: mapping lookup failure. class=class katz.integration.esb.errorhandling.datatype.ErrorMessage class context=TypedClassContext{schemaType=java:katz.integration.esb.errorhandling.datatype}
     at weblogic.webservice.core.DefaultPart.invokeSerializer(DefaultPart.java:339)
     at weblogic.webservice.core.DefaultPart.toXML(DefaultPart.java:304)
     at weblogic.webservice.core.DefaultMessage.toXML(DefaultMessage.java:651)
     at weblogic.webservice.core.ClientDispatcher.send(ClientDispatcher.java:209)
Please help. I have got stuck here for last couple of days.

Hi,
You can try to add this property setting in client code:
System.setProperty("javax.xml.rpc.ServiceFactory", "weblogic.wsee.jaxrpc.ServiceFactoryImpl");
Meanwhile, the line:
QName messageDatatype = new QName("java:katz.integration.esb.errorhandling.datatype");
should be:
QName messageDatatype = new QName("java:katz.integration.esb.errorhandling.datatype", "ErrogMessage"); ?
Thanks,
Kevin

Similar Messages

  • Dynamic Webservices Client

    Hey ,
    I have an application which requires to talk to 2 different published webservices
    from 2 different systems. Now instead od designing static webservice clients for
    each of these systems(which would involve having separate proxy jars etc),
    I am planning to design a dynamic webservice locator and invoker....
    I know that we can have webservice clients which are dynamic to the extent that
    we can create proxy objects at runtime once we know the endpoint WSDL..
    eg:
    ServiceFactory factory = ServiceFactory.newInstance();
    QName serviceName =new QName targetNamespace,"net.xmethods.services.stockquote.StockQuoteService");
    QName portName = new QName(targetNamespace,"net.xmethods.services.stockquote.StockQuotePort");
    QName operationName = new QName("urn:xmethods-delayed-quotes","getQuote");
    URL wsdlLocation = new URL("http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl");
    // create service
    Service service = factory.createService(wsdlLocation, serviceName);
    // create call Call call = service.createCall(portName, operationName);
    My question on this...if I have a dynamic approach like the above what are the
    pros and cons..I guess it would surely have more overhead compared to a static
    client...?
    Secondly ,is it even feasible to design a dynamic client in such a way that the
    endpoint WSDL could also be an unknown and my generic client would also locate
    the end-point dynamically and then invoke dynamic calls as above...
    If anybody can share their insights on a dynamic webservice client , I would really
    appreciate it...
    Thanx,
    Krish
    KRISH.VENKATARAMAN
    Senior Technology Analyst
    Bank of America Corp.
    Email:[email protected]

    Hi Krish,
    In WSDL, the data types passed between applications are described in schema
    and
    this is key for interop. I dont know of any standard/natural mapping for
    values types,
    object reference, etc in a binary protocol (like JRMP, IIOP) to schema. For
    eg:
    say there is serializable object Foo, which is the argument to a remote
    method in RMI.
    Object Foo can have data + behavior. It may be possible (not always, i
    think) to
    describe the data in Foo as schema, but how can one describe the behavior?
    So, if WSDL is the only contract between the server and client (key
    requirement
    for interop), then IMHO RMI can not be described by WSDL.
    Also, WSDL was designed for future extensions and does not map well to a
    programming API. WSIF trys to expose all the gory WSDL details and its apis
    are very clumsy.
    These were the two main reason to vote it down at JAX-RPC EC.
    I am attaching an example that shows, how to introspect WSDL and invoke
    a method using JAX-RPC (with little extension to the std api). Also, it
    shows
    how to handle complex type without data binding. Will this solve your
    problem?
    I am very interested to get your feedback on this.
    BTW, This example will only work with WLS 8.1.
    regards,
    -manoj
    "Krish Venkataraman" <[email protected]> wrote in message
    news:[email protected]...
    >
    >
    Mike...thanx for the inputs...
    As per ur suggestion...I have taken this offline and mailed u [email protected]
    also....lemme know if thatz cool...
    there are my observations..lemme know what am i missing..
    1) The main difference I see between JAX-RPC and WSIF, is that with WSIFclient
    it is easier to port to services talking
    via other ports like RMI,IIOP etc...where as JAX-RPC is understandsonly SOAP(atleast
    for now).
    2) Lets assume for the time-being that I would be interested only to talkto services
    talking SOAP.
    Then why do I need WSIF ?
    3) I can have a JX-RPC client , I can have a similar generic(reflection)code
    for built-in/primitive datatypes and for
    complex datatypes I anywayz would be doing the same thing(requiringthe java
    representation of the datatype unless I use
    something like JROM or something which I do not want to) in JAX-RPC orWSIF.
    >
    4) As far as syncronous or asyncronous invocation is concerned , myunderstanding
    is that my client call is going to remain the
    same ..the service provider is going to either use message-oriented orRPC
    on his side...
    Again assuming that I am interested only with services talking SOAP, thiscould
    be my generic client invocation design
    Background is that my client is going to run from within a WLS70sp1
    Actors:
    a) webSevice1ClientSessionBean : This will be a stateless session beanwhich might
    have knowledge about webSevice1's end-point ,
    complex dataTypes if any.
    (There would be other session beans like this which would haveknowledge about
    other specific webservice)
    b) GenericWebServiceInvoker : This will have knowledge about everythingwithin
    the webservice-standards/protocols.
    eg:
    //set weblogic ServiceFactory
    System.setProperty( "javax.xml.rpc.ServiceFactory",
    "weblogic.webservice.core.rpc.ServiceFactoryImpl" );
    //create service factory
    ServiceFactory factory = ServiceFactory.newInstance();
    //define qnames
    String targetNamespace = "http://soapinterop.org/";
    QName serviceName = new QName( targetNamespace, "SimpleTest" );
    QName portName = new QName( targetNamespace, "SimpleTestSoap" );
    QName operationName = new QName( "http://soapinterop.org/",
    "echoStruct" );
    //create service
    Service service = factory.createService( serviceName );
    TypeMappingRegistry registry = service.getTypeMappingRegistry();
    TypeMapping mapping = registry.getTypeMapping(
    SOAPConstants.URI_NS_SOAP_ENCODING );
    mapping.register( SOAPElement.class,
    new QName( "http://soapinterop.org/xsd", "SOAPStruct" ),
    new SOAPElementCodec(),
    new SOAPElementCodec() );
    //create call
    Call call = service.createCall();
    //set port and operation name
    call.setPortTypeName( portName );
    call.setOperationName( operationName );
    call.addParameter( "inputStruct",
    new QName( "http://soapinterop.org/xsd", "SOAPStruct" ),
    ParameterMode.IN);
    All parameter values specific to a particular webservice likeQName,targetNameSpace
    etc will be sent to this invoker by
    webSevice1ClientSessionBean. The GenericWebServiceInvoker will invokethe
    service
    (using reflection for primitive/builtin types) and alwayz accept anobject
    from the service operation and just return
    that "object" back the webSevice1ClientSessionBean.ThewebSevice1ClientSessionBean
    will know how to interpret the
    complexdataType or builtInDatatype whichever is returned.TheGenericWebServiceInvoker
    will not have any application
    specific knowledge...it will just have knowledge about how todiscover, invoke
    any SOAP webservice...
    Somewhere in the beginning of GenericWebServiceInvoker I will use JAXRto
    discover services from UDDI if needed.
    This way I will have a generic webservice client invocation frameworkwhich
    can invoke any service which talks SOAP.
    Now lemme know how the above picture looks and what is missing...
    I have some questions :
    1) Incase of complex dataTypes, I will have itz XML representation inthe
    publisher's WSDL and the publisher will give
    me the java representation of the complex dataType.But how does myclient
    JAX-RPC know how to map the XML
    to the java representation unless I specify the mapping somewhere?Does
    the TypeMapping/TypeMappingRegistry do this ?
    Thanx,
    Krish
    "Michael Wooten" <[email protected]> wrote:
    You know, it's really cool to hear guys thinking things through, before
    they "jump
    on a bandwagon" :-)
    Anyway, I suspect that the performance overhead of doing reflection,
    and heavy
    server-side code intrusion, is what has made a lot of developers balk
    at using
    WSIF. I would check out the IBM newsgroups, to see what the general
    developer
    sentiment is on WSIF.
    To achieve any sort of decent performance with JAX-RPC based webservices,
    you
    need to do a fair amount of optimization/tuning on both the client and
    server
    side. I recommend setting up your own "lab environment" for doing these,
    so you
    can see exactly what's making things improve/degrade. If you are really
    interested
    in this topic, we should talk about it "off-line".
    In general, the more "dynamic" things are on the client side, the slower
    things
    will be, the more you really need to question if you really need them
    to be dynamic
    :-) Does making it "dynamic" really offer something that you can't get
    from a
    "static" version? If not, who's really benefiting here. I mean, com'n.
    All you
    really want to do is invoke an operation, right? By the time you get
    all the information
    it takes to do a dynamic invocation (i.e. port, target namespace, data
    type for
    input argument, serializer/deserializer for each non-built-in data type,
    etc.),
    your client looks like you are trying to boot a PDP-11! LOL! For those
    of you
    who don't know what a PDP-11 is, it's an early computer (from the'60-'70),
    that
    you actually had to use switches to create the "binary instructions"
    to boot it
    up!
    From a PM's (product manager's) perpective, I wouldn't even let thedevelopers
    modify "working" EJBs to expose them as a web service. Alarm bells should
    go off
    in your head, if you have to modify existing server-side code to expose
    a company
    asset as a web service.
    Response to OT comment: WebLogic Server 7.0 uses its own implementation
    of JAX-RPC
    1.0. This implementation, I've been told by one of the BEA engineering
    that worked
    on it, has been certified to be JAX-RPC compliant by Sun. Don't know
    about Apache
    Axis, in this regard. I use both Apache Axis and the JWSDP with WLS 6.1,
    but I
    haven't really spent a lot of time looking for differences between our
    (BEA's)
    implementation, and theirs.
    Regards,
    Mike Wooten
    "Krish Venkataraman" <[email protected]> wrote:
    Hey Mike ...
    I hear ya..and I see the significance of WSIF...but that IBM started
    it a year
    back and itz not yet stabilized is what is holding me back...
    U mite have a better hold of what WSIF can do...whatever I could grasp
    from yesterday
    is this...
    a)It reads meta data from the wsdl and using a reflection mechanismcalls
    the
    service operations...
    I see examples with primitive datatypes..but what happens when
    complex/custom
    datatypes come into play...
    Would the client code differ between synchronous invocation toasynchronous
    invocation...
    And aleast in the samples for the WSIF distribution for connectors like
    EJB/JMS
    etc, the code does not look generic anymore..there are specific calls
    to operations
    and parameters...
    Also Mike , what is the trade-off on performance between having adynamic
    client(lets
    say based on WSIF)or having a static client...the extent of reflection
    a dynamic
    client will have to do and create SAAJ objects at runtime will beenormous..
    Also I know that there is a relevant API...but can u give an examleshowing
    me
    how I could discover services from UDDI ..?
    Out of this current topic...does BEA use itz own implementation of SOAP
    in itz
    webservice implementation...and how does it compare with AXIS ?
    Thanx,
    Krish
    "Michael Wooten" <[email protected]> wrote:
    Hi Krish,
    Well, I guess that's how things are when "needed functionality exceeds
    the current
    state of a technology" :-)
    I (not necessarily BEA) look at it like way:
    1. IBM co-authored the "Big 3" XML grammars for the current web
    services
    stack.
    2. IBM always appears to be "there, somewhere" in the new crop ofproposed
    additional
    XML grammars for "partially agreed upon extension layers", for theweb
    services
    stack.
    3. IBM donated it's original SOAP implementation to the open-sourcecommunity.
    4. IBM came up with WSIF over a year ago.
    5. IBM's WSTK uses the Apache Axis stuff.
    6. A lot of the JAX-RPC/JAXM API is based on the Apache SOAP and Apache
    Axis implementations.
    7. It looks like IBM may have donated WSIF to Axis.
    8. You appear to need something like WSIF :-)
    So, there's probably at least a 60/40 chance that some WSIF-like thing
    will make
    it into the JWSDP, right? If you want "higher odds", you should talk
    to the folks
    working on the JWSDP, as they are somewhat "in charge" here :-)
    Regards,
    Mike Wooten
    "Krish Venkataraman" <[email protected]> wrote:
    Yes...I am surely lookin at something similar...but that framework
    not
    being standardized
    scares me as I have seen many good ideas not seeing the light of the
    day...and
    I do not want to design something using a framework which might remain
    un-standardized..
    what are ur thots..
    Thanx,
    Krish
    "Michael Wooten" <[email protected]> wrote:
    Hi Krish,
    It sounds like you want WSIF :-)
    "WSIF allows stubless or completely dynamic invocation of a Web
    service,
    >>>>>>
    based upon examination of the meta-data about the service at runtime.
    It
    also allows updated implementations of a binding to be plugged intoWSIF
    at
    runtime, and it allows the calling service to defer choosing a
    binding
    until
    runtime."
    Correct?
    This is a relatively new "unofficial" addition to the Web ServicesStack,
    so it
    is not in WLS 7.0 (or Sun's JWSDP) yet. See the following link formore
    details:
    http://xml.apache.org/axis/wsif
    Regards,
    Mike Wooten
    "Krish Venkataraman" <[email protected]> wrote:
    Hey ,
    I have an application which requires to talk to 2 different
    published
    webservices
    from 2 different systems. Now instead od designing static webservice
    clients for
    each of these systems(which would involve having separate proxyjars
    etc),
    I am planning to design a dynamic webservice locator and invoker....
    I know that we can have webservice clients which are dynamic tothe
    extent
    that
    we can create proxy objects at runtime once we know the endpoint
    WSDL..
    eg:
    ServiceFactory factory = ServiceFactory.newInstance();
    QName serviceName =new QName
    targetNamespace,"net.xmethods.services.stockquote.StockQuoteService");
    >>>>>>>
    QName portName = newQName(targetNamespace,"net.xmethods.services.stockquote.StockQuotePort");
    >>>>>>>
    QName operationName = newQName("urn:xmethods-delayed-quotes","getQuote");
    >>>>>>>
    URL wsdlLocation = newURL("http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl");
    >>>>>>>
    // create service
    Service service = factory.createService(wsdlLocation, serviceName);
    // create call Call call = service.createCall(portName,
    operationName);
    >>>>>>>
    >>>>>>>
    My question on this...if I have a dynamic approach like the abovewhat
    are the
    pros and cons..I guess it would surely have more overhead comparedto
    a static
    client...?
    Secondly ,is it even feasible to design a dynamic client in such
    a
    way
    that the
    endpoint WSDL could also be an unknown and my generic client wouldalso
    locate
    the end-point dynamically and then invoke dynamic calls as above...
    If anybody can share their insights on a dynamic webservice client
    I would really
    appreciate it...
    Thanx,
    Krish
    KRISH.VENKATARAMAN
    Senior Technology Analyst
    Bank of America Corp.
    Email:[email protected]
    [BrowserClient.java]
    [DynamicClient.java]

  • Dynamic webservice client for User-defined datatypes

    Hi All,
    I have a webservices with user-defined datat types. I want to write a dynamic client that will work even if there are any changes in the wsdl, so that I do not want to recompile the client or make any changes on the client side.
    I tried using DII but we need to modify the custome objects and recompile the same. Suggest me any alternative.
    Regards,
    Sanjay

    Rob, unfortunately not. If I ever come across the solution, I will post it here.
    The reason I wanted to use weblogic webservices was to take advantage of the asynchronous webservice functionality. I ended up using xfire instead for my webservices, as we already had that in place in the application, and then using polling clients to get the response. Not an ideal solution, but it works very good anyway.
    regards,
    Marcus

  • Dynamic WebService Client

    hi,
    my requirment is to generate Dynaminc Webservice client
    i need to write logic which can take webservice url as  input and generate proxy class and call the methods in that webservice. pls help me to do this
    regards
    Guru

    Hi
    <b>Bojja Guruvulu</b>
    My Email Id is : <b>[email protected]</b>

  • Dynamic WebService client within a WebService Handler

    We have a WebService running on WebLogic 10.3 that has a handler that contains a Webservice client that connects to a set of IIS WebServices.
    The client is called with code like this:
    QName qname = new QName("http://www.company.com/Webservices/", "UserService");
    UserService service = new UserService(url, qname);
    service.setHandlerResolver(resolver);
    UserServiceSoap uss = service.getUserServiceSoap();
    The URL is dynamic, we have different servers that contain different data other than that they are the same. When this is called the first time with URL http://abc it works just fine. If it is called again but this time pointing to URL http://xyz, the client still goes to http://abc. We have check through debugging to ensure that we are really passing the correct URL, and we are. I traced this through a tool called WireShark and can see our client making 2 GET requests to the proper WSDL but then does the POST to http://abc. URLS have been altered to protect the innocent :) This same webservice containing this handler works as expected within Tomcat, it is in WebLogic that things get weird. Any help would be appreciated.
    Thanks,

    Hi
    <b>Bojja Guruvulu</b>
    My Email Id is : <b>[email protected]</b>

  • Steve Muenchs "Dynamic JDBC" on WLS 11g (10.3.1)?

    Hi,
    I try to run Steves Example "11g Dynamic JDBC Credentials for Model 1, Struts, Trinidad, and ADF Faces Rich Client" on Standalone WLS 11g (10.3.1) but it doesn't works... on integrated WLS it runs without problems. The WLS-Log shows:
    Modul:     oracle.adf.mbean.share.config.ADFConfigLifeCycleCallBack
    Message:     Failed to create config mbean.
    details: java.lang.Exception: oracle.mds.core.MetadataNotFoundException: MDS-00013: No Metadate for Metaobject "/META-INF/adf-config.xml" found.
    Does somebody have the example to run brought? Or if new settings are necessary for the example on WLS 11g?
    Kind regards
    Martin

    Hi,
    since Steve's solution has nothing to do with the adf-config, I suggest you create a simple testcase that reproduces the problem. It appears as if the ADF binding is not set up properly
    Frank

  • Adding a WebService Client to a Web Application

    Hi, Everybody,
    I built a Bepl Module in which I had a ECHO WebService and the response parameter is a complex type.
    Then I built a Web application, and used the WSDL file to add a WebService Client to a this Web Application,
    but I found that the WebService Referrence dose not contain any method, so I could not add it in my jsp page.
    But when I changed the Response Message Part Type into a simple one, everything worked fine.
    *All the progress is the same as " [Using a Manually Created WSDL as a Web Service Client|https://open-esb.dev.java.net/kb/v2/javaeesetut.html] ", but change the simple type into complex type.*
    I want to know if the WebService Client Referrence dose not support generating java code which contains complex type or I had a wrong operation?
    thanks

    There are current limitations with the wsimport functionality and an issue has been logged.
    If you have a look at the blog entry from Andrew Hopkinson.....
    [http://blogs.sun.com/toxophily/entry/javacaps_tip_migrating_a_simple]
    ...you'll see part way down what the WSDL must look like to work with wsimport, i.e.....
    Message parts must be created using an Element rather than a specific type and the element must be defined in a local in-line schema.
    This in-line element can only contain a sequence with a single sub-element of a specific Complex Type.
    The name of the input element must be the same as the operation it will be used in.
    nillable element option should not be used because this will cause your strings to be returned as JAXBElements and not Strings.
    ...etc....
    Bit painful I know, but this is the only workaround until the bug is fixed.

  • Invoking a bpel process using webservice client

    I am not able to run the sample webservice client from
    102.InvokingProcesses/ws.
    When I try my own program for 132.UserTasks(very similar to the example program),
    The correct input looks like
    <inputVariable>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
    - <ns1:stockReviewSheet xmlns:ns1="http://samples.otn.com">
    <ns1:symbol>ORCL</ns1:symbol>
    <ns1:targetPrice>100.0</ns1:targetPrice>
    <ns1:currentPrice>100.0</ns1:currentPrice>
    <ns1:action>200</ns1:action>
    <ns1:quantity>122</ns1:quantity>
    </ns1:stockReviewSheet>
    </part>
    </inputVariable>
    While from the invoking process whatever I give comes as
    <ns0:stockReviewSheet>
    <action>buy</action>
    <currentPrice>122.23</currentPrice>
    <quantity>100</quantity>
    <symbol>ORCL</symbol>
    <targetPrice>10.23</targetPrice>
    </ns0:stockReviewSheet>
    I am using the version 10.1.3 and the error I get on the application side is
    07/08/27 17:42:20.757 UserTaskSampleUI: Servlet error
    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
         at java.util.ArrayList.RangeCheck(ArrayList.java:546)
         at java.util.ArrayList.get(ArrayList.java:321)
         at java.util.Collections$UnmodifiableList.get(Collections.java:1155)
         at displayTask.jspService(_displayTask.java:105)
         at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.1.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:453)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Can anybody point me to invocation of bpel process via web service for complex object types like User for 10.1.3??
    Any input would be highly useful!!!
    Message was edited by:
    user576399
    Message was edited by:
    user576399

    Sancho,
    Thanks for the prompt reply. We trying to automate the following process:-
    1. The user select multiple documents from a folder in a library that contains all released documents.
    2. He then locks the documents.
    3. Selects the locked documents and copies it to a folder in the personal library.
    We are trying to lock and copy the documents as a 1 step process, because its difficult for the users to select all of the documents locked earlier and then copy it the personal library.
    We are trying to take the folder name as the user parameter, when the files are locked, so that the process and create the lock the files, create the folder and copy the files in this folder.
    Thanks again for your time and help.
    Hetal

  • Can I create a dynamic number of inputs during runtime?

    Can I create a dynamic number of inputs during runtime?
    Oracle 11g
    Application Express 4.0.2.00.06
    Here is my problem:
    We have a table that holds metadata about files (hardcopy or softcopy files).
    We expect we may need more columns in the table at some point and don't want to modify the table or the application.
    So in order to do this I would like to create:
    A table called TBL_FILE with the columns:
    TBL_FILE_ID               NUMBER                (This will be the primary key)
    TBL_FILE_NAME          VARCHAR2(1000) (This will be the name of the file)
    A second table will be called TBL_FILE_META with the columns:
    TBL_META_ID               NUMBER               (This will be the primary key)
    TBL_FILE_ID               NUMBER                (This will be the forign key to the file table)
    TBL_META_COLUMN     VARCHAR2(30)     (This is what the column name would be if it existed in TBL_FILE)
    TBL_META_VALUE          VARCHAR2(1000) (This is the value that record and the 'would be' column)
    So a person can have as much meta data on the file with out having to add columns to the table.
    The problem is how can I allow users to add as much data as they like with out having to re develop the page.
    Other things to note is that we would like this to be on a single page.
    I know how to add we can create multi-row inserts by using a SQL Query (updateable report),
    however the TBL_META_VALUE column in the TBL_FILE_META will sometimes be a select list and other times a text box or number field.
    So I don't see now a SQL Query (updateable report) would work for this and I can't create an array of page items at run time can I?
    Any idea's how I could accomplish this? Is there a better way of doing this?
    Also is there a term or a name for what I am doing by creating these 'virtual' columns in another table?
    I found this method when looking at Oracles Workflow tables.

    Welcome to the Oracle Forums !
    >
    Can I create a dynamic number of inputs during runtime?
    Oracle 11g
    Application Express 4.0.2.00.06
    Here is my problem:
    We have a table that holds metadata about files (hardcopy or softcopy files).
    We expect we may need more columns in the table at some point and don't want to modify the table or the application.
    So in order to do this I would like to create:
    A table called TBL_FILE with the columns:
    TBL_FILE_ID NUMBER (This will be the primary key)
    TBL_FILE_NAME VARCHAR2(1000) (This will be the name of the file)
    A second table will be called TBL_FILE_META with the columns:
    TBL_META_ID NUMBER (This will be the primary key)
    TBL_FILE_ID NUMBER (This will be the forign key to the file table)
    TBL_META_COLUMN VARCHAR2(30) (This is what the column name would be if it existed in TBL_FILE)
    TBL_META_VALUE VARCHAR2(1000) (This is the value that record and the 'would be' column)
    So a person can have as much meta data on the file with out having to add columns to the table.
    The problem is how can I allow users to add as much data as they like with out having to re develop the page.
    >
    Creating Page Items dynamically is not available. You will have to create excess items and hide/show , etc. But you cannot change the Item Type. All in all, too many limitations in this approach.
    >
    Other things to note is that we would like this to be on a single page.
    >
    The 100 item limit will hit you if you go with extra item on page. With Tabular Form that should not be a limitation, unless you are exceeding the 50 item limit of APEX_APPLICATION.G_Fnn items, and the 60 column limitation of Report region with "Use Generic Column Names (parse query at runtime only)" of Dynamic region.
    >
    I know how to add we can create multi-row inserts by using a SQL Query (updateable report),
    however the TBL_META_VALUE column in the TBL_FILE_META will sometimes be a select list and other times a text box or number field.
    >
    If the type if item is variable it only means you need a way to store the item type. Meta Data of the Meta Data.
    >
    So I don't see now a SQL Query (updateable report) would work for this and I can't create an array of page items at run time can I?
    >
    Yes, you can do it. Updatable report/ Tabular Form query can be constructed from the Meta Data using PL/SQL Function Returning SQL Query . It will be a bit of coding in PL/SQL where you use the Meta Data and the Meta Data of the Meta Data to piece together your SELECT with the right APEX_ITEMs. It might have a performance penalty associated with it, but will not be a serious degradation.
    >
    Any idea's how I could accomplish this? Is there a better way of doing this?
    Also is there a term or a name for what I am doing by creating these 'virtual' columns in another table?
    I found this method when looking at Oracles Workflow tables.
    >
    I guess that is just a good TNF. It is the Master-Detail Design Pattern, that sound more modern ? ;)
    Regards,

  • Webservice client generated from WSDL null entity problem

    hi,
    I'am having a serious problem using the generation (data centric development) capability of Flash builder.
    I have a simple XSD and generated WSLD (from Spring Framework using JAXB). In this I have defined an UpdateRelatie function.
    It looks something like this:
        <xsd:element name="UpdateRelatieRequest">
            <xsd:complexType>
                 <xsd:sequence>
                    <xsd:element name="relatie" type="relatie" minOccurs="1" maxOccurs="1"/>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:element>
        <xsd:element name="UpdateRelatieResponse">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element name="relatie" type="relatie" minOccurs="1" maxOccurs="1"/>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:element>
        <xsd:complexType name="relatie">
            <xsd:sequence>
                <xsd:element name="id" type="xsd:int" />
                <xsd:element name="naam" type="xsd:string" />
                <xsd:element name="telefoonNummer" type="xsd:string" />
                <xsd:element name="mobielNummer" type="xsd:string" />
                <xsd:element name="email" type="xsd:string" />
                <xsd:element name="rekeningNummer" type="xsd:string" />
                <xsd:element name="btwNummer" type="xsd:string" />
                <xsd:element name="kvkNummer" type="xsd:string" />
                <xsd:element name="actief" type="xsd:boolean" />
            </xsd:sequence>
        </xsd:complexType>
    My generated WSDL looks something like this (for the update part as show above).
    <?xml version="1.0" encoding="UTF-8" standalone="no"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:schema="http://www.mydomain.nl/gbs/service/ws" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://www.mydomain.nl/gbs/service/ws">
      <wsdl:types>
        <xsd:schema xmlns="http://www.mydomain.nl/gbs/service/ws" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.mydomain.nl/gbs/service/ws">
      [excluded xsd.. see above]
    </xsd:schema>
      </wsdl:types>
      <wsdl:message name="UpdateRelatieRequest">
        <wsdl:part element="schema:UpdateRelatieRequest" name="UpdateRelatieRequest">
        </wsdl:part>
      </wsdl:message>
      <wsdl:message name="UpdateRelatieResponse">
        <wsdl:part element="schema:UpdateRelatieResponse" name="UpdateRelatieResponse">
        </wsdl:part>
      </wsdl:message>
       <wsdl:portType name="Relatie">
        <wsdl:operation name="UpdateRelatie">
          <wsdl:input message="schema:UpdateRelatieRequest" name="UpdateRelatieRequest">
        </wsdl:input>
          <wsdl:output message="schema:UpdateRelatieResponse" name="UpdateRelatieResponse">
        </wsdl:output>
        </wsdl:operation>
      </wsdl:portType>
      <wsdl:binding name="RelatieBinding" type="schema:Relatie">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="UpdateRelatie">
          <soap:operation soapAction=""/>
          <wsdl:input name="UpdateRelatieRequest">
            <soap:body use="literal"/>
          </wsdl:input>
          <wsdl:output name="UpdateRelatieResponse">
            <soap:body use="literal"/>
          </wsdl:output>
        </wsdl:operation>
      </wsdl:binding>
      <wsdl:service name="RelatieService">
        <wsdl:port binding="schema:RelatieBinding" name="RelatiePort">
          <soap:address location="http://localhost:8080/GBS/relatieService"/>
        </wsdl:port>
      </wsdl:service>
    </wsdl:definitions>
    When I run my test client written in Java, I can update any given relatie-object in my database.
    BUT when I, based upon this, generate a webservice stub using the "data -> connect to webservice" option. I get nicely generated code and the ability to to bind this to an form with which I can edit the data.
    Now for my PROBLEM:
    When I enter data in the form, during the process of transforming my Relatie object to XML, my entire object disappears. i.e. my object does NOT get transformed to XML for soap transport. Somewhere deep in the webservice code, it just gets ignored and I do NOT know why.
    What does work is retrieving data through a webservice. I can display a nice grid full of data from my database. What does not work is trying to send a domain object (Relatie) from Flex through a webservice and process it in java. The object is null on the java side. I can even see in the resulting soap envelope that nothing gets transformed to XML. See output below:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
                       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
      <SOAP-ENV:Body>   
        <schema:UpdateRelatieRequest xmlns:schema="http://www.mydomain.nl/gbs/service/ws"/>  <!-- NO OBJECT -->
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Which should have been based upon the given WSDL (as the java client does send over the wire)
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
      <ns3:InsertRelatieRequest xmlns:ns3="http://www.mydomain.nl/gbs/service/ws">
        <relatie>
          <btwNummer>BTW</btwNummer>                                                                                            <!-- OBJECT PRESENT -->
          <actief>false</actief>
       </relatie>
      </ns3:InsertRelatieRequest>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Can anyone help me please. I'am stuck now.
    Kind regards,
    Marc

    Thanks for the detailed steps. I was able to reproduce the issue.
    I have logged an issue under 'WebService'. https://bugs.adobe.com/jira/browse/SDK-24841 . We will look into it.
    -Radhakrishna

  • Problem running ClientGen  generated webservice client

    I'm using Workshop for Weblogic 10.3 and I'm trying to generate a webservice client. When I generate it with ClientGen and I try to use it I get the following error:
    Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/j2ee/descriptor/ServiceRefHandlerBean
    at weblogic.wsee.jaxrpc.HandlerRegistryImpl.<init>(HandlerRegistryImpl.java:32)
    at weblogic.wsee.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:88)
    at com_service_osadia_interface.wovenware.SERVICE_OSADIA_Impl.<init>(Unknown Source)
    at com_service_osadia_interface.wovenware.SERVICE_OSADIA_Impl.<init>(Unknown Source)
    at testClient.main(testClient.java:18)
    If I add the com.bea.core.descriptor.j2ee_1.1.0.0.jar to the libraries then I get the following error:
    Exception in thread "Main Thread" java.lang.NoClassDefFoundError: com/sun/xml/ws/util/JAXWSUtils
    at weblogic.wsee.util.is.InputSourceUtil.loadURL(InputSourceUtil.java:44)
    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)
    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)
    at weblogic.wsee.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:119)
    at com_service_osadia_interface.wovenware.SERVICE_OSADIA_Impl.<init>(Unknown Source)
    at com_service_osadia_interface.wovenware.SERVICE_OSADIA_Impl.<init>(Unknown Source)
    at testClient.main(testClient.java:18)
    How can I fix it?

    I didn't see a mistake, but my sample works fine. Are you trying to execute the client from Workshop / Eclipse? If that is the case, then I believe it's a matter of just using the appropriate client libraries, which I believe is your issue even though the error is misleading. You should definitely try using a Java Project for a stand-alone web service invocation. According to this link: http://edocs.bea.com/wls/docs103/webserv_rpc/client.html#wp229351 you simply need 1 jar file named wseeclient.jar on your path, which is archived inside <WL_INSTALL>\wlserver_10.3\server\lib\wseeclient.zip
    Once I set up a new Java Project with wseeclient.jar on my path and my clientgen generated classes, I could invoke the sample.
    Also, here is what the successful invocation from the command line using (ant build, ant deploy, ant run):
    C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\src\examples\webservices\jws_basic\simple>ant build
    Buildfile: build.xml
    clean:
    [delete] Deleting directory C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar
    [delete] Deleting directory C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\clientclasses\webservicesJwsSimple_client
    server:
    [mkdir] Created dir: C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar
    [jwsc] JWS: processing module /SimpleImpl
    [jwsc] Parsing source files
    [jwsc] Parsing source files
    [jwsc] 1 JWS files being processed for module /SimpleImpl
    [jwsc] JWS: C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\src\examples\webservices\jws_basic\simple\SimpleImpl.java Validated.
    [jwsc] Since compiler setting isn't classic or modern,ignoring fork setting.
    [jwsc] Compiling 2 source files to C:\temp\_x58sqp
    [jwsc] Since compiler setting isn't classic or modern,ignoring fork setting.
    [jwsc] Copying 1 file to C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar\SimpleImpl\WEB-INF
    [jwsc] Copying 22 files to C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar\SimpleImpl\WEB-INF
    [jwsc] Copying 2 files to C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar\SimpleImpl\WEB-INF\classes
    [jwsc] Copying 1 file to C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar\SimpleImpl
    [jwsc] [EarFile] Application File : C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar\META-INF\application.xml
    [AntUtil.deleteDir] Deleting directory C:\temp\_x58sqp
    client:
    [mkdir] Created dir: C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\clientclasses\webservicesJwsSimple_client
    [clientgen] Ignoring JAX-WS options - building a JAX-RPC client
    [clientgen]
    [clientgen] *********** jax-rpc clientgen attribute settings ***************
    [clientgen]
    [clientgen] wsdlURI: file:/C:/Oracle/wls10.3/wlserver_10.3/samples/server/examples/build/webservicesJwsSimpleEar/SimpleImpl/WEB-INF/SimpleImplService.wsdl
    [clientgen] serviceName : null
    [clientgen] packageName : examples.webservices.jws_basic.simple.client
    [clientgen] destDir : C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\clientclasses\webservicesJwsSimple_client
    [clientgen] handlerChainFile : null
    [clientgen] generatePolicyMethods : false
    [clientgen] autoDetectWrapped : true
    [clientgen] jaxRPCWrappedArrayStyle : true
    [clientgen] generateAsyncMethods : true
    [clientgen]
    [clientgen] *********** jax-rpc clientgen attribute settings end ***************
    [clientgen] Package name is examples.webservices.jws_basic.simple.client
    [clientgen] DestDir is C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\clientclasses\webservicesJwsSimple_client
    [clientgen] class name is Simple_Stub
    [clientgen] service class name is SimpleImplService
    [clientgen] Porttype name is Simple
    [clientgen] service impl name is SimpleImplService_Impl
    [javac] Compiling 4 source files
    [javac] Note: C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\clientclasses\webservicesJwsSimple_client\examples\webservices\jws_basic\simple\client\Simple_Stub.java uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] Compiling 1 source file to C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\clientclasses\webservicesJwsSimple_client
    [jar] Updating jar: C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\examplesWebApp\WEB-INF\lib\jws_basic_simple.jar
    [copy] Copying 1 file to C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\examplesWebApp
    build:
    BUILD SUCCESSFUL
    Total time: 22 seconds
    C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\src\examples\webservices\jws_basic\simple>ant deploy
    Buildfile: build.xml
    deploy:
    [wldeploy] weblogic.Deployer -verbose -noexit -source C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar -targets examplesServer -adminurl t3://localhost:7001 -user weblogic -password ******** -deploy
    [wldeploy] weblogic.Deployer invoked with options: -verbose -noexit -source C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar -targets examplesServer -adminurl t3://localhost:7001 -user weblogic -deploy
    [wldeploy] <Dec 23, 2008 2:48:19 PM CST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, webservicesJwsSimpleEar [archive: C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJws
    SimpleEar], to examplesServer .>
    [wldeploy] Task 0 initiated: [Deployer:149026]deploy application webservicesJwsSimpleEar on examplesServer.
    [wldeploy] Task 0 completed: [Deployer:149026]deploy application webservicesJwsSimpleEar on examplesServer.
    [wldeploy] Target state: deploy completed on Server examplesServer
    [wldeploy]
    [wldeploy] Target Assignments:
    [wldeploy] + webservicesJwsSimpleEar examplesServer
    BUILD SUCCESSFUL
    Total time: 9 seconds
    C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\src\examples\webservices\jws_basic\simple>ant run
    Buildfile: build.xml
    run:
    [java] Got result: Here is the message: 'Hi there!'
    BUILD SUCCESSFUL
    Total time: 7 seconds
    C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\src\examples\webservices\jws_basic\simple>

  • Error in generated webservice client

    Hello all,
    I've been working on some webservice that receives large attachments, and my eye fell on the "streaming attachments" functionality of oc4j 10.1.3. So I've followed the examples of the "Oracle Application server Web Services Developer's Guide" pdf, assembled my webservice and deployed it. No problem so far. So, intent on testing my fresh service, I took the wsdl that was generated and used the WebserviceAssembler to generate a clientwith the genProxy command.
    However, everytime I try to run the client I get the following error:
    java.rmi.RemoteException: Error parsing envelope: (1, 1) Start of root element expected.; nested exception is:
         javax.xml.soap.SOAPException: Error parsing envelope: (1, 1) Start of root element expected.
         at com.xplanation.workflow.soap.runtime.HttpSoap11Binding_Stub.launch(HttpSoap11Binding_Stub.java:124)
         at com.xplanation.workflow.soap.ProjectLaunchPortClient.launch(ProjectLaunchPortClient.java:74)
         at com.xplanation.workflow.soap.ProjectLaunchPortClient.main(ProjectLaunchPortClient.java:57)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)
    Caused by: javax.xml.soap.SOAPException: Error parsing envelope: (1, 1) Start of root element expected.
         at oracle.j2ee.ws.saaj.soap.soap11.SOAPImplementation11.createEnvelope(SOAPImplementation11.java:93)
         at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:75)
         at oracle.j2ee.ws.saaj.soap.MessageImpl.getSOAPBody(MessageImpl.java:678)
         at oracle.j2ee.ws.client.StreamingSender._preHandlingHook(StreamingSender.java:662)
         at oracle.j2ee.ws.client.StubBase._preHandlingHook(StubBase.java:634)
         at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:194)
         at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:110)
         at com.xplanation.workflow.soap.runtime.HttpSoap11Binding_Stub.launch(HttpSoap11Binding_Stub.java:96)
         ... 7 more
    Caused by: oracle.xml.parser.v2.XMLParseException: Start of root element expected.
         at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:328)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:290)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:199)
         at oracle.j2ee.ws.saaj.soap.soap11.SOAPImplementation11.createEnvelope(SOAPImplementation11.java:67)
         ... 14 more
    Is there any way to check the SOAP message that is being sent? Maybe I'm initializing the Attachments incorrectly?
    Here's the code I use for that...
    DataSource dataSource = new InputStreamDataSource("application/octet-stream", new FileInputStream(file));
                        dataHandler = new DataHandler(dataSource);
                        att = new AttachmentImpl(file.getName(), dataHandler);
                        System.out.println(" - attachment created for " + att.getId());
    //                    att = factory.createAttachment(file.getName(), "application/octet-stream", new FileInputStream(file));
                        atts.getOutgoingAttachments().addAttachment(att);
    Finding documentation about these streaming attachments is such a drag, that I'm considering switching to MIME or DIME. Does anyone have any suggestions? Keep in mind that I'll have to deal with possibly large files (certainly up to 20MB)...
    Regards,
    Stan

    Thought I'd add the generated WSDL file...
    Thanks in advance for any replies!
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://soap.workflow.xplanation.com/" name="projectlaunch" targetNamespace="http://soap.workflow.xplanation.com/">
    <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://soap.workflow.xplanation.com/" elementFormDefault="qualified">
    <complexType name="launch">
    <sequence>
    <element name="processCode" type="string" nillable="true"/>
    <element name="processType" type="string" nillable="true"/>
    <element name="projectTitle" type="string" nillable="true"/>
    <element name="projectNumber" type="string" nillable="true"/>
    <element name="docTypeCode" type="string" nillable="true"/>
    <element name="domainCode" type="string" nillable="true"/>
    <element name="sourceLanguage" type="string" nillable="true"/>
    <element name="targetLanguages" type="string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
    <element name="dueDate" type="string" nillable="true"/>
    <element name="userLogin" type="string" nillable="true"/>
    <element name="password" type="string" nillable="true"/>
    </sequence>
    </complexType>
    <complexType name="launchResponse">
    <sequence>
    <element name="result" type="int" nillable="true"/>
    </sequence>
    </complexType>
    <complexType name="IOException">
    <sequence>
    <element name="message" type="string" nillable="true"/>
    </sequence>
    </complexType>
    <element name="launchElement" type="tns:launch"/>
    <element name="launchResponseElement" type="tns:launchResponse"/>
    <element name="IOExceptionElement" type="tns:IOException"/>
    </schema>
    </types>
    <message name="StreamedProjectLaunch_launchResponse">
    <part name="parameters" element="tns:launchResponseElement"/>
    </message>
    <message name="StreamedProjectLaunch_launch">
    <part name="parameters" element="tns:launchElement"/>
    </message>
    <message name="IOException">
    <part name="IOExceptionElement" element="tns:IOExceptionElement"/>
    </message>
    <portType name="StreamedProjectLaunch">
    <operation name="launch">
    <input message="tns:StreamedProjectLaunch_launch"/>
    <output message="tns:StreamedProjectLaunch_launchResponse"/>
    <fault name="IOException" message="tns:IOException"/>
    </operation>
    </portType>
    <binding name="HttpSoap11Binding" type="tns:StreamedProjectLaunch">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="launch">
    <soap:operation soapAction="http://soap.workflow.xplanation.com//launch"/>
    <sa:stream-attachments xmlns:sa="http://oracle.com/schemas/webservices/streaming-attachments" name="attachments"/>
    <input>
    <soap:body use="literal" parts="parameters"/>
    </input>
    <output>
    <soap:body use="literal" parts="parameters"/>
    </output>
    <fault name="IOException">
    <soap:fault name="IOException" use="literal" encodingStyle=""/>
    </fault>
    </operation>
    </binding>
    <service name="projectlaunch">
    <port name="ProjectLaunchPort" binding="tns:HttpSoap11Binding">
    <soap:address location="http://localhost:8888/projectlaunch/projectlaunch"/>
    </port>
    </service>
    </definitions>

  • JAX-RPC Dynamic Proxy Client Question

    I have a very simple web service successfully deployed using Tomcat 5 and Apache Axis. It simply takes a string and returns a String. Regardless, it's working.
    Now I'm wanting to create a JAX-RPC dynamic proxy client as described on the following page:
    http://java.sun.com/webservices/docs/1.3/tutorial/doc/JAXRPC5.html
    There are numerous other articles out there describing the same method.
    My problem is that I'm getting a ServiceException on the following line every time I try to run my client:
    ServiceFactory factory = ServiceFactory.newInstance();
    Would anyone have any ideas why this might be or what I might be missing? All the articles make it seem like this is just a trivial line and never mention much about it.
    Any help would be appreciated. Thanks.

    Hello,
    You are getting a service Exception on ServiceFactory.newInstance() method?
    Actually, I have never seen this problem before. Is it possible that there are
    classpath issues? That is, are you using just the jars from the jwsdp?
    Regards,
    Kathy

  • No SOAPAction in dynamic proxy client

    I am trying to consume a .NET Web service from a J2EE client. I am using a dynamic proxy client from http://java.sun.com/webservices/docs/1.3/tutorial/doc/JAXRPC5.html#wp79973
    However, I am have a problem with the SOAPAction HTTP header. .NET requires this header element to be set but the proxy sends an empty SOAPAction header. What is the solution to this problem?

    message.getHeaders().addHeader("SoapAction","http://some.action.here");
    this piece of code is not working. This what i'm using.
    my .net service is running at ""http://192.168.4.214/dmwebservice/service1.asmx";" and my method name is "disconnect_cabinet"
    mesg.getMimeHeaders().addHeader("POST" , " /dmwebservice/service1.asmx HTTP/1.1");
    mesg.getMimeHeaders().addHeader("HOST" , " http://192.168.4.214");
    mesg.getMimeHeaders().addHeader("SOAPAction", " http://tempuri.org/disconnect_cabinet");
    the request & response is:
    [java] **** request ****
    [java] <?xml version="1.0" encoding="utf-8"?>
    [java] <SOAP-ENV:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/so
    ap/encoding" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs
    d="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema
    -instance"><SOAP-ENV:Header><SOAPAction xmlns="http://192.168.4.214/dmwebservice
    /service1.asmx/disconnect_cabinet"/></SOAP-ENV:Header><SOAP-ENV:Body><disconnect
    _cabinet xmlns="http://tempuri.org/"><credentials>123456</credentials></disconne
    ct_cabinet></SOAP-ENV:Body></SOAP-ENV:Envelope>
    [java] **** response ****
    [java] <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="htt
    p://schemas.xmlsoap.org/soap/envelope/"><soap:Header><wsu:Timestamp xmlns:wsu="h
    ttp://schemas.xmlsoap.org/ws/2002/07/utility"><wsu:Created>2004-06-28T05:00:50Z<
    /wsu:Created><wsu:Expires>2004-06-28T05:05:50Z</wsu:Expires></wsu:Timestamp></so
    ap:Header><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>
    System.Web.Services.Protocols.SoapHeaderException: The message is not a valid XM
    L message ---> System.Xml.XmlException: 'soap' is an undeclared namespace. Li
    ne 2, position 20.
    [java] at System.Xml.XmlNSAttributeTokenInfo.FixNames()
    [java] at System.Xml.XmlTextReader.ParseElement()
    [java] at System.Xml.XmlTextReader.Read()
    [java] at Microsoft.Web.Services.XmlSkipDTDReader.Read()
    [java] at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
    [java] at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, B
    oolean preserveWhitespace)
    [java] at System.Xml.XmlDocument.Load(XmlReader reader)
    [java] at Microsoft.Web.Services.SoapEnvelope.Load(Stream stream)
    [java] at Microsoft.Web.Services.WebServicesExtension.BeforeDeserializeS
    erver(SoapMessage message)
    what does this means and how can i fix? "The message is not a valid XML message ---> System.Xml.XmlException: 'soap' is an undeclared namespace. Line 2, position 20."
    please let me know.
    subhani.

  • Dynamically loading client proxy no longer works

    I've got several instances where we need to dynamically load/initialize a WebService client proxy using a URL classloader all within an Applet. The need for the classloader and dynamic loading is due to the seperate jars holding different system modules. One main module can't possible know which submodules are also installed and have WebServices running.
    Instead, the main module reads the location of a class to load and uses a URL classloader to load that class. The loaded class knows about it's own client proxy to use and tries to load the appropriate jar and class. The proxy is successfully found and loaded using the classloader, but pukes during initialization. It appears the RuntimeModeler can't find the generated IsAvailable class even though it exists in the same signed jar that just got loaded and which contains the very client proxy that is trying to initialize itself.
    This process worked fine using 1.5, but no longer works after migrating to 1.6. Am I missing something obvious?
    Classloader: java.net.FactoryURLClassLoader@863cc1
    WebAppMgr.getServiceProxy -> b4 initialize
    class: com.irista.warehouse.webservice.wmscoredata.server.data.IsAvailable could not be found
         at com.sun.xml.internal.ws.modeler.RuntimeModeler.getClass(Unknown Source)
         at com.sun.xml.internal.ws.modeler.RuntimeModeler.processDocWrappedMethod(Unknown Source)
         at com.sun.xml.internal.ws.modeler.RuntimeModeler.processMethod(Unknown Source)
         at com.sun.xml.internal.ws.modeler.RuntimeModeler.processClass(Unknown Source)
         at com.sun.xml.internal.ws.modeler.RuntimeModeler.buildRuntimeModel(Unknown Source)
         at com.sun.xml.internal.ws.client.ServiceContextBuilder.processAnnotations(Unknown Source)
         at com.sun.xml.internal.ws.client.ServiceContextBuilder.completeServiceContext(Unknown Source)
         at com.sun.xml.internal.ws.client.WSServiceDelegate.processServiceContext(Unknown Source)
         at com.sun.xml.internal.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(Unknown Source)
         at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(Unknown Source)
         at javax.xml.ws.Service.getPort(Unknown Source)
         at com.irista.warehouse.webservice.wmscoredata.server.data.WmsCoreDataWS.getWarehouseCoreDataWSPort(WmsCoreDataWS.java:50)
         at com.irista.warehouse.webservice.wmscoredata.client.WmsCoreDataSvcProxy.initialize(WmsCoreDataSvcProxy.java:92)
         at com.irista.ui.webapp.framework.WebAppManager.getServiceProxy(WebAppManager.java:760)
         at com.irista.warehouse.webapps.scheduling.CycleCountParameterPanel.getCycleCountSets(CycleCountParameterPanel.java:309)
         at com.irista.warehouse.webapps.scheduling.CycleCountParameterPanel.refreshAction(CycleCountParameterPanel.java:236)
         at com.irista.warehouse.webapps.scheduling.CycleCountParameterPanel.preDisplay(CycleCountParameterPanel.java:225)
         at com.irista.warehouse.webapps.scheduling.CycleCountParameterPanel.initialize(CycleCountParameterPanel.java:149)
         at com.irista.foundation.webapps.scheduling.TaskTypeParameterPanel.createParameterPanel(TaskTypeParameterPanel.java:473)
         at com.irista.foundation.webapps.scheduling.TaskTypeParameterPanel.refreshAction(TaskTypeParameterPanel.java:147)
         at com.irista.foundation.webapps.scheduling.TaskTypeParameterPanel.preDisplay(TaskTypeParameterPanel.java:331)
         at com.irista.ui.webapp.framework.TabbedAppletPane.changePanel(TabbedAppletPane.java:311)
         at com.irista.ui.webapp.framework.TabbedAppletPane$TabbedChangeListener.stateChanged(TabbedAppletPane.java:385)
         at javax.swing.JTabbedPane.fireStateChanged(Unknown Source)
         at javax.swing.JTabbedPane$ModelListener.stateChanged(Unknown Source)
         at javax.swing.DefaultSingleSelectionModel.fireStateChanged(Unknown Source)
         at javax.swing.DefaultSingleSelectionModel.setSelectedIndex(Unknown Source)
         at javax.swing.JTabbedPane.setSelectedIndexImpl(Unknown Source)
         at javax.swing.JTabbedPane.setSelectedIndex(Unknown Source)
         at javax.swing.plaf.basic.BasicTabbedPaneUI$Handler.mousePressed(Unknown Source)
         at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)

    Are you running SP2 R2? This worked for me as well until I upgraded to SCCM 2007 SP2 R2. I am focusing on the "~Doing Account Cleanup" errors in the ccm.log which should happen every 30 days, not every 20 minutes. Those errors have to be related to client push problems. Also, thanks for the reboot suggestion. I realize anytime a computer object is added to a domain security group that has is a member of a local group on the client, that a reboot is necessary on client systems in order to receive a new Kerberos access token but in the case of my test systems, I have explicitly added the computer account to the local administrators group so a reboot is not required. I have a test site in a completely different forest and it behaves almost the same way (doesn't run the "~Doing Account Cleanup" every 20 minutes) but still fails to install the client using the site server's computer account. Must be me!!!   

Maybe you are looking for

  • AP Payment to Generl Ledger (11i)

    Dear All, if I know the payment number and the payment has been transfered to general ledger, How can I get the journal batch name and journal name of the payment journal? Could someone comment? Thanks & Best Regards, Jerome

  • Possible to ssh tunnel Bonjour traffic across different subnets?

    Hello: For quite some time, I have been thinking of buying a couple of iSights to enable audio/visual between two distant computers. But I really don't want to have to leave a dozen ports in my DSL modems opened up in order to use AIM or Jabber serve

  • Elements 9 Question

    Hi, I need to be able to use Filter/Artistic/Plastic Wrap on some of the alphabetic characters in my images. I have successfully used it in some of my images; but on other images I cannot get it to work.  Or it works and I get a distorted gradient fi

  • Differences between BDC and LSMW

    Hello SAP Gurus, Kindly let me know the various differences between BDC and LSMW. Also, please tell me the STEPS of the CUT-OVER PLANNING (Shifting of Data from the Legacy System to the SAP System). Here, the "Data" means which data? Please explain i

  • System.master_timezone vs. system.default.timezone

    Hi Guys, I have a question when it comes to TimeZones - I found that setting the system master time zone the system can normalize the time stamps to one point in time, independent of the users time zone settings; and then based on those calculate the