EJB 3.0 Web Services - Custom Request/Response Wrappers

Hi All,
I'm having an issue using Document Literal Wrapped web services with EJB 3.0. I have declared a service endpoint interface(SEI) in one jar file, along with custom wrapper classes for the requests and responses. The wrappers have the XML content customized a bit (different type names, etc.), but should be compatible with the @RequestWrapper and @ResponseWrapper annotations. The implementation is in an EJB jar file that includes the jar with the SEI in it. My issue is that the wrapper classes I declared are not being used, and instead new ones are being generated. Is it even possible for it to use supplied wrappers, or does it have to generate its own (and if so, is it in any way possible to specify the XML types it generates). I've tested this with wsgen, and I get the same result (new wrapper classes, the ones I supplied ignored) as when I deploy it. Here is the output from wsgen:
Note: ap round: 1
[ProcessedMethods Interface: com.company.IngestorService]
[should process method: ingestProductDirectory hasWebMethods: false ]
[endpointReferencesInterface: true]
[declaring class has WebSevice: true]
[returning: true]
[WrapperGen - method: ingestProductDirectory(java.lang.String,java.lang.String)]
[method.getDeclaringType(): com.company.IngestorService]
[requestWrapper: com.company.IngestProductDirectoryRequest]
[should process method: datatypes hasWebMethods: false ]
[endpointReferencesInterface: true]
[declaring class has WebSevice: true]
[returning: true]
[WrapperGen - method: datatypes()]
[method.getDeclaringType(): com.company.IngestorService]
[requestWrapper: com.company.DatatypesRequest]
com\company\DatatypesRequest.java
com\company\DatatypesResponse.java
com\company\IngestProductDirectoryRequest.java
com\company\IngestProductDirectoryResponse.java
Note: ap round: 2
I note that is says "hasWebMethods: false". Could that be an issue? Could it not be seeing my methods as web methods. The SEI and the implementation class are in different jar files and different packages. Could this be an issue?
Here is the web service interface:
@WebService(
name = "IngestorService",
targetNamespace = "http://company.com/"
@SOAPBinding(
style = SOAPBinding.Style.DOCUMENT,
parameterStyle = SOAPBinding.ParameterStyle.WRAPPED
public interface IngestorService
@WebMethod(
action = "http://company.com/ingestProductDirectory"
@WebResult(
name = "response",
targetNamespace = ""
@RequestWrapper(
className = "com.company.IngestProductDirectoryRequest"
@ResponseWrapper(
className = "com.company.IngestProductDirectoryResponse"
public void ingestProductDirectory(
@WebParam(
name = "sourceDirectory",
targetNamespace = ""
String sourceDirectory,
@WebParam(
name = "datatype",
targetNamespace = ""
String datatype);
@WebMethod(
operationName = "datatypes",
action = "http://company.com/datatypes"
@WebResult(
name = "datatypes",
targetNamespace = ""
@RequestWrapper(
localName = "DatatypesRequest",
className = "com.company.DatatypesRequest"
@ResponseWrapper(
localName = "DatatypesResponse",
className = "com.company.DatatypesResponse"
public List datatypes();
Here are the datatype request and response wrappers:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(
name = "DatatypesRequest"
public class DatatypesRequest
DatatypesResponse.java:
@XmlAccessorType(XmlAccessType.PROPERTY)
@XmlType(
name = "DatatypesResponse",
propOrder =
"datatypes"
public class DatatypesResponse
private List<String> _datatypes;
@XmlElementWrapper(
name = "datatypes",
required = true,
nillable = false
@XmlElement(
name = "datatype",
required = false
public List<String> getDatatypes() {
if (_datatypes == null) {
_datatypes = new ArrayList<String>();
return _datatypes;
Any help would be greatly appreciated. Thanks.

I have been trying to do the same... and it seems to be impossible... (or completly undocumented).
It seems that OC4J 10.3.x is ... no exactly fully EJB3/J2EE5 compliant...
Or something like that:
http://blogs.infosupport.com/berte/archive/2005/09/09/1117.aspx
IMHO... OC4J 10.3.x is still a preview for OC4J 11...
OC4J 10.3.x is kind of a J2EE4/5 hybrid... if you start digging in the documentation, you will find out that the only
way to have WS-Security is going back to J2EE4 http://www.oracle.com/technology/products/jdev/howtos/1013/wssecure/10gwssecurity_howto.html
(of course, I hope you probe me wrong)
Message was edited by:
luxspes

Similar Messages

  • SPML Web Service -  custom Add Response

    Hi,
    Each time an Add Request is requested to OIM's SPML Web Services, there is a standard SPML Add Response received where in PSO ID is returned.
    We in our project are looking to customise this format and return additional parameters (which OIM would generate based on some logic) to the requesting consumer.
    Can I achieve this in OIM. Is this an Out-of-the-box feature OR some thing which I would need to do. If so, kindly eloborate and brief me the steps to proceed.
    Edited by: bond8135 on 11-Apr-2010 18:37

    Sunny,
    As you have pointed out, API will work.
    But regarding your statement:
    "Use SPML10g along with SPML11g (this is the cleanest OOTB solution wherein you can use the older set of SPML methods to fetch the userKey and then use newer SPML methods to perform asynchronous operations). I did the same"
    SPML samples that came with 10g did not work with OIM 11g for me. Because from what I know, SPML in 10g made use of DSML profile and that is not supported in 11g.
    http://docs.oracle.com/cd/E14571_01/doc.1111/e14309/spmlapi.htm#CHDCBJAI
    "SPML has two profiles: the XSD profile and the DSML profile. This release of Oracle Identity Manager makes use of the XSD profile."
    Did you tweak something to get it working?
    Thanks.

  • EJB 3.0 Web Service

    Hi!
    I tried to create a Web Service (through wizard) from existing EJB 3.0 Session Bean. Basicly, the wizard just added @WebService annotation to my existing code...
    Now, the problem is that simple methods like:
    @WebMethod
    public String helloWorld() {
      return "Hello World!";
    }works fine. Expect that if I use Local Interface for this Session Bean, the WSDL shows two helloWorld methods (and one is with exclamation icon showing some kind of problem with multiple methods with same name - but it is not true, I have one and the other one is just interface).
    But, when I want to expose my real business service methods like:
    @WebMethod
    public List<Employee> getEmployees() {
      return (List<Employee>)q.getResultList();
    }it doesn't work (the Web Service create wizard finishes ok but service doesn't work)! When I try "Test Web Service" (from Session Bean context-menu) or "Show WSDL for Web Service annotations" the error is thrown (Null pointer exception in WSDL).
    Basically, it looks to me that Web Service cannot use EJB Entities as parameters or results. Is this correct? I saw some examples on EJB 3.0 web services and there are entities routinely used as both input and output parameters.
    Can someone, please, explain me what I'm doing wrong here.
    Thanks in advance,
    Pedja
    P.S. In Web Service wizard, only SOAP 1.1 is enabled. How can I choose SOAP 1.2? And what EJB 3.0 bindings are in same context (SOAP 1.2 or EJB 3.0 bindings?)?

    Hi Frank,
    Most of those problems are resolved (NPE was due to Timestamp field, and two methods with the same name in WSDL because of not choosing to generate SEI in wizard, so the generated WSDL had one method from the Session bean and the other from it's Local interface). But, the errors should DEFINITELY be more descriptive.
    Does the wizard work correctly? I noticed plenty of "bug like" details. For example, if I choose to create asynchronous web service, later when I go to Properties the "Asynchronous Web Service" checkbox isn't checked. Also, the @WebMethod annotations are sometimes generated and sometimes not (even if the method is checked to be exposed).
    I am also getting these exceptions when I create a proxy for the asynchronous web service (I selected "Generate asynchronous methods for all operations"), could be I'm doing something wrong:
    WARNING: The parameter/return type "java.util.concurrent.Future" in the method
    "public abstract java.util.concurrent.Future<?>
    view.proxy.MyAsyncWebService1.queryDepartmentFindAllAsync(javax.xml.ws.AsyncHandler<view.proxy.types.QueryDepartmentFindAllResponse>)"
    is not supported. This method will not be exposed.
    WARNING: The parameter/return type "java.util.concurrent.Future" in the method
    "public abstract java.util.concurrent.Future<?>
    view.proxy.MyAsyncWebService1.returnEmployeeAsync(javax.xml.ws.AsyncHandler<view.proxy.types.ReturnEmployeeResponse>)"
    is not supported. This method will not be exposed.
    Exception in thread "main" java.lang.NullPointerException
         at com.sun.xml.bind.v2.runtime.Coordinator.popCoordinator(Coordinator.java:122)
         at com.sun.xml.bind.v2.runtime.XMLSerializer.close(XMLSerializer.java:823)
         at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:310)
         at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:230)
         at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:87)
         at oracle.j2ee.ws.common.databinding.runtime.jaxb20.Jaxb20Serializer.serialize(Jaxb20Serializer.java:218)
         at oracle.j2ee.ws.common.databinding.runtime.SerializerBase.serializeSequenceWrapper(SerializerBase.java:80)
         at oracle.j2ee.ws.client.jaxws.SoapRequestorSerializer.populateSoapMessage(SoapRequestorSerializer.java:89)
         at oracle.j2ee.ws.client.jaxws.WsClientProxyInvocationHandler.invoke(WsClientProxyInvocationHandler.java:184)
         at $Proxy11.returnEmployee(Unknown Source)
         at MyAsyncWebService1SoapHttpPortClient.main(MyAsyncWebService1SoapHttpPortClient.java:22)
    Process exited with exit code 1.Can anyone throw some light on this?
    Thanks,
    Pedja

  • Article written on EJB 3.0 , web services develop n deploy on JBOSS AS

    Dear Friends
    I would like to announce the article written on EJB 3.0 , web services development and deployment on JBOSS AS at the following location http://jamessmithjava.100webcustomers.com/index.html , I think this would help developers to increase interest on JBoss as well as EJBs
    Regards
    James
    [email protected]
    http://tech.groups.yahoo.com/group/james_smithjava

    Dear Friends
    I would like to announce the article written on EJB 3.0 , web services development and deployment on JBOSS AS at the following location http://jamessmithjava.100webcustomers.com/index.html , I think this would help developers to increase interest on JBoss as well as EJBs
    Regards
    James
    [email protected]
    http://tech.groups.yahoo.com/group/james_smithjava

  • EJB exposed as web services

    I am very new to web services.
    I understand that a Stateless bean can be exposed using RPC style web services.
    But I want to know if a stateless session bean can be accessed by EJB client and Web service client (java or non-java) simultaneously. ?
    i.e. 1. Can same bean serve two types of client simultaneously.(java and non-java client)
    2. Does this web service accept complex java object as input parameters. and how?

    Hi Patrik,
    > Exception raised from invocation of public void com.sap.sia.serviceMonitor.ServiceMonitorBean.initPostConstruct() method on bean instance com.sap.sia.serviceMonitor.ServiceMonitorBean@5a8ab489 ... ; nested exception is: java.lang.NullPointerException
    The NPE occurs in the bean code, in the initPostConstruct() method or some other method it calls. Unfortunately, its stack trace is not available above, but you should be able to find it in the defaultTrace file.
    HTH!
    \-- Vladimir

  • Overloaded ejb methods as web service

    I implemented an ejb as a web service. The ejb has 4 overloaded methods. When I looked at the generated wsdl, only one signature was exposed as a web service. Is there a way to make all 4 overloaded methods available to the web service ?

    Hi Sandy,
    The WLS 6.1 docs clear states that method overloading is not supported with WebLogic
    Web Services:
    http://e-docs.bea.com/wls/docs61/webServices/develop.html#1034539
    However, you might be able to simulate something similar by passing a org.w3c.dom.DocumentFragment
    to the method. For example,
    public org.w3c.dom.DocumentFragment overloadedMethod(org.w3c.dom.DocumentFragment
    variableArgs)
    This allows you to use the flexibility of XML to provide various input and output
    parameters for the method. In the method's implementation, you determine which
    arguments have been passed by parsing the variableArgs node. For quasi type safety,
    you could use the xsi:type attribute to associate data types with fragment elements.
    Note that you will need to use literal XML encoding to do this.
    HTH,
    Mike Wooten
    Sandy <[email protected]> wrote:
    I implemented an ejb as a web service. The ejb has 4 overloaded methods.
    When I looked at the generated wsdl, only one signature was exposed
    as a web service. Is there a way to make all 4 overloaded methods available
    to the web service ?

  • BUG: Web service returns request XML as response when result too large

    Hi,
    sorry for cross-posting, but the Web Services forum seems to be quite abandoned and this is an urgent issue for me.
    I have a web service returning some records of a given type (created using JDeveloper 10.1.3.3). The running environment and the service implementation do not seem to make any difference, as the situation is the same whether running it in embedded OC4J or in AS 10.1.3.1, and whether it is generated from a PL/SQL procedure or a method of a plain Java class.
    The problem is that if the result of this web service is too large (contains a lot of records), then the processing halts in some Oracle class in some web service library, so not in a debuggable generated web service source or in the service implementation itself.
    I think that the XML processing halts because of a "java.lang.OutOfMemoryError: Java heap space".
    Then a more serious problem follows: the service doesn't return a fault message but the original request XML as a response. Obviously, this can lead to some really unexpected errors.
    To reproduce this error:
    1. Create a Java class with a method returning an array of an arbitrary type, of the size specified in an input parameter.
    2. Create a web service from this class.
    3. Call it multiple times increasing the size parameter in every call until you get back the request as response or any error message.
    For example:
    - if you test the web service using the web page generated to access the endpoint, then you can see the response XML - in case you don't get an Internal Server Error (Java heap space).
    - if you use a generated web service proxy for testing, then it will give an error saying "unexpected element name: expected={namespace}someOperationResponseElement
    actual={namespace}someOperationElement".
    Any ideas how to locate / solve this problem?
    Regards,
    Patrik

    Patrik,
    the usual recommendation is to try with 10.1.3.3 instead of 10.1.3.1 to exclude you are hunting down an already fixed issue. From what you describe, the error seems less JDeveloper related than OC4J or OracleAs.
    So in case it reproduces in 10.1.3.3 I suggest to create a testcase and open a service request with support, or try the OC4J forum in case its known there.
    Frank

  • Error during JNDI lookup Accessing Remote EJB (access to web service restricted using declarative security model)

    Hello everyone,
    I developed a Web Service prototype accessing remote EJB using the EJB
    control with special syntax in the jndi-name attribute: @jws:ejb
    home-jndi-name="t3://10.10.245.70:7131/AccountDelegatorEJB"
    Everything works fine, but I get an error when I restrict access to my web
    service with a declarative security model by implementing steps provided in
    help doc:
    - Define the web resource you wish to protect
    - Define which security role is required to access the web resource
    - Define which users are granted the required security role
    - Configure WebLogic Server security for my web service(Compatibility
    Security/Users)
    I launch the service by entering the address in a web browser. When prompted
    to accept the digital certificate, click Yes, when prompted for network
    authentication information, enter username and password, navigate to the
    Test Form tab of Test View, invoke the method by clicking the button and I
    get the following exception:
    <error>
    <faultcode>JWSError</faultcode>
    <faultstring>Error during JNDI lookup from
    jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookup failed for
    name:t3://10.10.245.70:7131/AccountDelegatorEJB]</faultstring>
    <detail>
    <jwErrorDetail> weblogic.jws.control.ControlException: Error during JNDI
    lookup from jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookup failed
    for name:t3://10.10.245.70:7131/AccountDelegatorEJB] at
    weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
    8) at
    weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
    .java:220) at
    weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260) at
    ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
    ibas.GetSecure.retrieveVisaHistoryTxn(GetSecure.jws:64) </jwErrorDetail>
    </detail>
    </error>
    I have a simple Hello method as well in my WebService (which is also
    restricted) and it works fine, but remote EJB access doesn't. I tested my
    prototype on Weblogic 7.2 and 8.1 platforms - same result.
    Is that a bug or I am missing some additional configuration in order to get
    that working. Has anyone seen similar behavior? Is there a known resolution?
    Or a suggested way to work around the problem?
    Thank you.
    Andre

    Andre,
    It would be best if this issue is handled as an Eval Support case. Please
    BEA Customer Support at http://support.beasys.com along with the required
    files, and request that an Eval support case be created for this issue.
    Thanks
    Raj Alagumalai
    WebLogic Workshop Support
    "Andre Shergin" <[email protected]> wrote in message
    news:[email protected]...
    Anurag,
    I removed "t3", still get an error but a different one (Unable to create
    InitialContext:null):
    <error>
    <faultcode>JWSError</faultcode>
    <faultstring>Error during JNDI lookup from
    jndi://secuser1:[email protected]:7131/AccountDelegatorEJB[Unable to
    create InitialContext:null]</faultstring>
    <detail>
    <jwErrorDetail> weblogic.jws.control.ControlException: Error during JNDI
    lookup from
    jndi://secuser1:[email protected]:7131/AccountDelegatorEJB[Unable to
    create InitialContext:null] at
    weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
    8) at
    weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
    .java:220) at
    weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260) at
    ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
    ibas.GetVisaHistoryTransactions.getVisaHistoryTxn(GetVisaHistoryTransactions
    .jws:67) </jwErrorDetail>
    </detail>
    </error>
    Note: inter-domain communication is configured properly. The Web Service to
    remote EJB works fine without a declarative security.
    Any other ideas?
    Thank you for your help.
    Andre
    "Anurag" <[email protected]> wrote in message
    news:[email protected]...
    Andre,
    It seems you are using the URL
    jndi:t3://secuser1:[email protected]:7131/AccountDelegatorEJB
    whereas you should not be specifying the "t3:" protocol.
    The URL should be like
    jndi://secuser1:[email protected]:7131/AccountDelegatorEJB
    Please do let me know if you see any issues with this.
    Note that this will only allow you to access remote EJBs in the same WLS
    domain. For accessing EJBs on another domain, you need to configure
    inter-domain communication by
    following a few simple steps as mentioned at
    http://e-docs.bea.com/wls/docs81/ConsoleHelp/jta.html#1106135. This link has
    been provided in the EJB Control Workshop documentation.
    Regards,
    Anurag
    "Andre Shergin" <[email protected]> wrote in message
    news:[email protected]...
    Raj,
    I tried that before, it didn't help. I got similar error message:
    <error>
    <faultcode>JWSError</faultcode>
    <faultstring>Error during JNDI lookup from
    jndi:t3://secuser1:[email protected]:7131/AccountDelegatorEJB[Lookup
    failed for
    name:t3://secuser1:[email protected]:7131/AccountDelegatorEJB]</faultstr
    ing>
    <detail>
    <jwErrorDetail> weblogic.jws.control.ControlException: Error during JNDI
    lookup from
    jndi:t3://secuser1:[email protected]:7131/AccountDelegatorEJB[Lookup
    failed for
    name:t3://secuser1:[email protected]:7131/AccountDelegatorEJB] at
    weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
    8) at
    weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
    .java:220) at
    weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260) at
    ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
    ibas.GetSecure.retrieveVisaHistoryTxn(GetSecure.jws:64) </jwErrorDetail>
    </detail>
    </error>
    Anything else should I try?
    P.S. AccountDelegatorEJB, the remote EJB my Web Service calls is NOTaccess
    restricted.
    I hope there is a solution.
    Thanks,
    Andre
    "Raj Alagumalai" <[email protected]> wrote in message
    news:[email protected]...
    Andre,
    Can you try using the following url with username and password
    jndi://username:password@host:7001/my.resource.jndi.object ?
    once you add webapp level security, the authenticated is the user who
    invokes the EJB.
    http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/controls/ejb/con
    CreatingANewEJBControl.html?skipReload=true
    has more info on using remote EJB's.
    Hope this helps.
    Thanks
    Raj Alagumalai
    WebLogic Workshop Support
    "Alla Resnik" <[email protected]> wrote in message
    news:[email protected]...
    Hello everyone,
    I developed a Web Service prototype accessing remote EJB using the EJB
    control with special syntax in the jndi-name attribute: @jws:ejb
    home-jndi-name="t3://10.10.245.70:7131/AccountDelegatorEJB"
    Everything works fine, but I get an error when I restrict access to my
    web
    service with a declarative security model by implementing steps
    provided
    in
    help doc:
    - Define the web resource you wish to protect
    - Define which security role is required to access the web resource
    - Define which users are granted the required security role
    - Configure WebLogic Server security for my web service(Compatibility
    Security/Users)
    I launch the service by entering the address in a web browser. Whenprompted
    to accept the digital certificate, click Yes, when prompted for
    network
    authentication information, enter username and password, navigate tothe
    Test Form tab of Test View, invoke the method by clicking the buttonand
    I
    get the following exception:
    <error>
    <faultcode>JWSError</faultcode>
    <faultstring>Error during JNDI lookup from
    jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookup failed for
    name:t3://10.10.245.70:7131/AccountDelegatorEJB]</faultstring>
    <detail>
    <jwErrorDetail> weblogic.jws.control.ControlException: Error during
    JNDI
    lookup from jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookupfailed
    for name:t3://10.10.245.70:7131/AccountDelegatorEJB] at
    weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
    8) at
    weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
    .java:220) at
    weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260)at
    ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
    ibas.GetSecure.retrieveVisaHistoryTxn(GetSecure.jws:64)</jwErrorDetail>
    </detail>
    </error>
    I have a simple Hello method as well in my WebService (which is also
    restricted) and it works fine, but remote EJB access doesn't. I testedmy
    prototype on Weblogic 7.2 and 8.1 platforms - same result.
    Is that a bug or I am missing some additional configuration in order
    to
    get
    that working. Has anyone seen similar behavior? Is there a knownresolution?
    Or a suggested way to work around the problem?
    Thank you.
    Andre

  • Picklist web Service Custom Object

    I am using the Picklist web Services and am trying to use them against a custom Object. They work fine for standard objects such as account but are failing against my custom object. I have tried calling it "Custom Object 01", "CustomObject1","connection" etc etc. I get the feeling that these web services do not work against custom objects... Does anybody have any experience to the contrary????
    createSession();
    picklist.Picklist pick = new iLink.picklist.Picklist();
    pick.Url = session.GetURL();
    picklist.PicklistWS_GetPicklistValues_Input input = new iLink.picklist.PicklistWS_GetPicklistValues_Input();
    picklist.PicklistWS_GetPicklistValues_Output output = new iLink.picklist.PicklistWS_GetPicklistValues_Output();
    input.RecordType = "CustomObject1";
    input.FieldName = "IndexedPick0";
    output = pick.GetPicklistValues(input);
    session.Destroy(session.sessionId);
    Thanks in advance for your comments...

    Hi Sean,
    Yes - I raised with Customer Care and the naming needs to be "Custom Object 1". Thanks for your response.

  • Authenticating web services -- get Invalid Response Code:(401) Unauthorized

    Hi,
    ich have implemented a websirve in dynpro java (thanks for all the guys who wrote guides for that), but i still have a problem. i have to set username and password for authorization.
    i have already tested follwoing code:
    reqMo.wdSetInvocationModifier(
               new IWDWSInvocationModifier() {
                 public void doModifyInvocation(Object port) {
                    // Creating the SOAP Header node.
                    HTTPControlInterface http = HTTPControlFactory.getInterface(port);
                    http.setHTTPProxyUserPass("xxxxx","xxxxxx");
                 public void doModifyAfterInvocation() {}
    but i get same message as follows:
    Exception on execution of web service with WSDL
    URL 'http://server:port/special/wsdl_report_gen.wsdl' with operation '_-xxxx_-generateReport' in
    interface '{urn:sap-com:document:sap:soap:functions:mc-style}XXXX_REPORT_GEN':
    Invalid Response Code: (401) Unauthorized. The requested URL
    was:"http://server:port/sap/bc/srt/rfc/sap/XXXX_report_gen/111/XXXX_report_gen/XXXX_report_gen";
    nested exception is:
    com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid
    Response Code: (401) Unauthorized. The requested URL
    was:"http://server:port/sap/bc/srt/rfc/sap/XXXX_report_gen/111/XXXX_report_gen/XXXX_report_gen"
    any ideas?
    Edited by: Dennis Ahaus on Dec 10, 2008 11:40 AM

    Hi Dennis Ahaus,
    If you are using Adaptive webservice model, you can provide the credentials as below.
    wdContext.currentXXXXElement().modelObject().setInvokerProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY,"username");
    //           wdContext.currentXXXXElement().modelObject().setInvokerProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY,"password");          
    Regards,
    VJR.

  • EJB 3.0 Web service fail to deploy when ws result is on a diff lib project

    I'm trying to develop a web service using EJB 3.0 with annotations. I'm using Netbeans 5.5 EE.
    The web service should returns an object declared on another Netbeans project.
    ( a library.jar).
    Netbeans compiles everything alright, although when I deploy the application into Glassfish it complains with an error saying that wsdl file for the web service wasn't found.
    If I move the returning object class into the same ejb project as the web service it works fine.
    So, can anybody explain what is happening ? Is it a bug of Netbeans, Glassfish, EJB 3.0, JAX-WS or newbie programmer ?

    I'm trying to develop a web service using EJB 3.0 with annotations. I'm using Netbeans 5.5 EE.
    The web service should returns an object declared on another Netbeans project.
    ( a library.jar).
    Netbeans compiles everything alright, although when I deploy the application into Glassfish it complains with an error saying that wsdl file for the web service wasn't found.
    If I move the returning object class into the same ejb project as the web service it works fine.
    So, can anybody explain what is happening ? Is it a bug of Netbeans, Glassfish, EJB 3.0, JAX-WS or newbie programmer ?

  • SOAP Web Service +  Custom Login Module issue

    Hi Guys,
    We faced an authentication issue in our project. Could you please give any advice how the issue could be resolved.
    Environment: A simple SOAP Web Service on top of POJO class created in a Web Application. The web application deployed to the SAP NetWeaver 7.10 Application Server in the Enterprise Application Archive.
    Configuration:
          Single Service Administration Application(NetWeaver Administration -> SOA Management -> Application and Scenario Communication -> Single Service Administration)
           The web service endpoint has authentication configured to use User ID/Password HTTP Authentication.
        Authentication Application(NetWeaver Administration-> Configuration Management->Security->Authentication)
          The application(<vendorName>/<earName>*<vendor>~<webAppName>) has Authentication Stack configured to use our custom login module.
    Issue:  BasicPasswordLoginModule used by the J2EE when we are trying to execute the web service using Web Service Navigator(checked in debug mode). It seems that we missed something in configuration.
    Idea: The main Idea is to use our custom login module when we are executing a web service.
    Could you help me to resolve the issue.
    Thanks,
    Dmitry
    Edited by: Dmitry Eidin on Jul 17, 2009 3:46 PM

    > The web service endpoint has authentication configured to use User ID/Password HTTP Authentication.
    That's the point.

  • EJB 3.0 web services security (WS-Security)

    How do I enable WS-Security on EJB 3.0 based web services? Since only the @WebService annotation is required to expose a EJB 3.0 bean as a web service, how do I configure options that were previously in oracle-webservices.xml under the <security> tag?

    I have been trying to do the same... and it seems to be impossible... (or completly undocumented).
    It seems that OC4J 10.3.x is ... no exactly fully EJB3/J2EE5 compliant...
    Or something like that:
    http://blogs.infosupport.com/berte/archive/2005/09/09/1117.aspx
    IMHO... OC4J 10.3.x is still a preview for OC4J 11...
    OC4J 10.3.x is kind of a J2EE4/5 hybrid... if you start digging in the documentation, you will find out that the only
    way to have WS-Security is going back to J2EE4 http://www.oracle.com/technology/products/jdev/howtos/1013/wssecure/10gwssecurity_howto.html
    (of course, I hope you probe me wrong)
    Message was edited by:
    luxspes

  • ODI Invoke Web Service XML Request error.

    hi,
    i want to invoke a web service from ODI 10g.
    i use OdıInvokeWebService in package.
    in General tab. I wrote the parameters values. when i execute package
    it gives error;
    com.sunopsis.wsinvocation.SnpsWSInvocationException: Part does not exist:Header
         at com.sunopsis.wsinvocation.client.a.d.a(d.java)
         at com.sunopsis.wsinvocation.client.a.d.a(d.java)
         at com.sunopsis.wsinvocation.client.a.d.b(d.java)
         at com.sunopsis.wsinvocation.client.a.c.a(c.java)
         at com.sunopsis.wsinvocation.client.a.c.getWebServiceRequestByOperation(c.java)
         at com.sunopsis.dwg.tools.InvokeWebService.actionExecute(InvokeWebService.java)
         at com.sunopsis.dwg.function.SnpsFunctionBase.execute(SnpsFunctionBase.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execIntegratedFunction(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlS.treatTaskTrt(SnpSessTaskSqlS.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.k(e.java)
         at com.sunopsis.dwg.cmd.g.A(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    when i invoke from advanced button web service retrieve data.
    and XML Request parameter is wrong. what is wrong about XML request?
    i copied XML Request value from SoapUI.
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:db="DB_SUBS_BUDGET">
    <soapenv:Header>
    <db:QaaWSHeader>
    <!--Optional:-->
    <db:sessionID xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
    <!--Optional:-->
    <db:serializedSession xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
    </db:QaaWSHeader>
    </soapenv:Header>
    <soapenv:Body>
    <db:runQueryAsAService>
    <db:login>DWH_BO</db:login>
    <db:password>Pass1234</db:password>
    </db:runQueryAsAService>
    </soapenv:Body>
    </soapenv:Envelope>
    thanks

    hi again,
    i solved "Part does not exist:Header" error
    i changed xml request
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:db="DB_SUBS_BUDGET">
    <db:QaaWSHeader/>
    <db:runQueryAsAService>
    <db:login>DWH_BO</db:login>
    <db:password>Avea1234</db:password>
    </db:runQueryAsAService>
    </soapenv:Envelope>
    now a new error occures;
    how can i pass this error?.
    java.lang.Exception: org.apache.crimson.tree.XmlDocument.getXmlStandalone()Z
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.k(e.java)
         at com.sunopsis.dwg.cmd.g.A(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    thanks

  • Web service error in response "Element '{ namespace }return' missing"

    Hi all,
    I'm quite new to ABAP development on Web services, and I encountered a problem after calling a web service method.
    I created a Service Consumer proxy from an external WSDL, then created its port in SOAMANAGER.
    Now, when I call one of its methods, an exception occurs. But I was able to debug that there is a response being sent by the web service. However, during the CALL TRANSFORMATION (found in class CL_SXMLP_DATA_ST method IF_SXML_SERIALIZABLE~DESERIALIZE) it raises the error:
    Element '{<namespace>}return' missing
    (I can't show the namespace but it's like "https://xxx.xxxxxxxxxxxxx.com/xxxxxxxx")
    I tried to search the forums about this, but haven't found any yet that could help me. I can't also modify the code since this is already SAP standard.
    Thanks in advance!

    Problem solved..

Maybe you are looking for

  • Expanding Text Glossary Terms into Popup windows

    I am using RH6 and I have a help project that uses expanding text glossary terms throughout all the topics. When the topic is printed out, the glossary terms are auto expanded and it disrupts the flow of the text. My questions are: Is there a way to

  • What is data Class ?

    Hi. I need to know what is "data class". I am aplying a hot package in SAP, and it generated a error because el data class USR34 not exists associated with cdhdr table. The note says that I must create it, but I don´t know how I must to do it. And  I

  • Streaming audio radio

    I was previously with Optimum Online before and was able to stream radio from www.cmatt.com.  Now that I have Verizon Fios, I get an error message on Media Player and it will not play.  I am able to take my PC and stream at my sister-in-law's house,

  • Can't Open CC program on 3rd Computer?

    I have installed CC programs on two computers, and am trying to run a CC program on a third (my laptop), but can't. The other two computers aren't currently open. Any help is appreciated.

  • Using ipod while running

    Hi, I listen to my ipod while I run but have it just sitting in my pocket while I do my thing. As a result it swings around a lot throughout my runs. I've noticed that at about 25 mins in, it starts to skip a lot which I'm sure is a result of the ski