Problem generating Web Service with business methods in multiple EJB's

Hi,
I'm I a "web service novice" but I'm working with an
application which was developed in an earlier version
of Studio which has
~30 business method coming from ~12 EJB's. When I attempt
to recreate the Web Service in Java Studio Enterprise 7 (had same problem versions 5 and 6) I have trouble. When I execute the "Generate Web Service Files" command I get complilation errors in the <webservice_name>.java file. It is obvious that the
protected Map theJNDIMap = makeJNDIMap();
protected Map makeJNDIMap() {
     Map m = new HashMap();
     // This map might get changed at deployment time
     m.put(......
is all screwed up. Entries are missing and the closing bracket isn't even there.
Is there some user error on my part?
Is this a know bug (I couldn't any info. and I get the same behavior on the current and older versions of Studio)?
Is there a workaround? I can fix this particular java file and compile it sucessfully. However, I'm still missing many of the other web service files that should be generated for me.
All the tutorials on web services that I've done to looked over all get there business method from 1 EJB :(
Please advise,
Freda Phelps

I had a problem too. Successfully created an EJB and its test application. Tested the same using Web client and works fine. Now created a web service from EJB methods. It created the skeletons. When tried creating Web Svc test client or web svc other files..it gives me an exception saying xmlservices.jar doesnt exist in the C:\Docs and Settings\<$username>\.jstudio\Ent04Q4modules. I have searched for this file and copied (overwritten) it into this directory. But still i cant proceed further.

Similar Messages

  • Use web service with overloaded method

    Hi all,
    Does anyone knows how can I use (e.g in VC or GP) a web service with overloaded methods?
    When I try to use one, I get the following error message:
    com.sap.engine.services.webservices.jaxrpc.exceptions.ProxyGeneratorException: Proxy Generator Error. WSDL Operation with name [search] is overloaded (defined twice). Operation overloading is not supported by proxy generator.
    Can I set something in order to be able to use such type of services. Or some other solution?
    For some reasons I do not want to change the service operation names.
    Thanks in advance!
    Best regards,
    v s

    Hi all,
    Does anyone knows how can I use (e.g in VC or GP) a web service with overloaded methods?
    When I try to use one, I get the following error message:
    com.sap.engine.services.webservices.jaxrpc.exceptions.ProxyGeneratorException: Proxy Generator Error. WSDL Operation with name [search] is overloaded (defined twice). Operation overloading is not supported by proxy generator.
    Can I set something in order to be able to use such type of services. Or some other solution?
    For some reasons I do not want to change the service operation names.
    Thanks in advance!
    Best regards,
    v s

  • Problem consuming web service with basic authentication

    Hello,
    I've set up a web service with basic authentication. Although I have to log in before being able to open the overview page of the web service in the Web Service Navigator, the response I get after sending a request is:
    Authority check failed
    I get this response in the Web Service Navigator as well as when consuming the web service via standalone proxy classes.
    The following is strange, too: It is not possible to change  authentication in the generated logical port. It is set to "none". I changed it via the XML file where I added the properties "AuthenticationMethod" (value "BasicAuth") and "AuthenticationMechanism" (value "HTTP"). But I got the above response anyway.
    Thanks for your help!
    Regards

    I used basic authentication for my web service.
    I was able to obtain a hardcopy of the logfiles in the meantime. The invocation of the web service is stored there with the following error messages:
    <i>SOAP Runtime: Exception message: Schwerer Prozessierungsfehler macht eine SOAP-Fault-Behandlung erforderlich
    SOAP Runtime: SOAP Fault exception occurred in program CL_SOAP_RUNTIME_SERVER========CP in include CL_SOAP_RU NTIME_SERVER... [the picture is cut here]</i>
    In addition to that I found a thread in SDN that dealt with exactly the same problem:
    Web Service Homepage: Authority check failed
    But I have the same problem like Kimberly Carmack (the last post on the second page). We do not have that role in our system.

  • Problem implementing web services with types generated by jdeveloper 10.1.3

    Hello,
    I have generated a web service using JDeveloper 10.1.3.3. from a WSDL. This WSDL includes a schema with some types defined. There is a element with the following definition:
    <xs:element name="OptionalInputs" type="AnyType"/>
    where:
    <xs:complexType name="AnyType">
    <xs:sequence>
    <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    The meaning of the element OptionalInputs is that it can include other elements, of any type, definied within the same schema.
    After generating the web service from the WSDL, I get the following:
    - A Class named 'AnyType' that consists of one element of type
    protected javax.xml.soap.SOAPElement[] _any;
    - Some classes which must be included in an object of type 'AnyType', and that implements java.io.Serializable.
    However, I do not know how to include successfully one of this (serializable) classes into an object of type 'AnyType' (SOAPElement[]).
    Could you be so kind as to help me, please?
    Thank you very much in advance.

    Hi there,
    10.1.3 is not production ready yet, and you will find this warning on the oracle page http://www.oracle.com/technology/tech/java/oc4j/1013/index.html
    "Under no circumstances should it be used in production environments."
    Does this mean that it's not possible to deploy a Doc/Lit webservice to production using JDeveloper? Is there any other way of getting it to work with 10.1.2?
    Thanks,
    Vid.

  • Problem deploying web service with the deploy tool (J2EE)

    Hello,
    I am trying to deploy a sample Web Service on the Sun Java System Application Server Platform Edition 8.1 2005Q1.
    I run into a deployment problem ("jaxrpc compilation exception") when I have one of the web methods declared (in the endpoint interface) to throw a service-specific exception. The problem disappears when I change the declaration to throw an Exception.
    Here is the exception class:
    public class StockNotFoundException extends Exception {
    private String message;
    public StockNotFoundException(String message) {
    super(message);
    this.message = message;
    public String getMessage() {
    return message;
    the endpoint interface:
    public interface StockServiceIF extends Remote {
    // the service methods
    public boolean sellStocks(String ticker, int quantity)
    throws RemoteException, StockNotFoundException;
    and here are the error messages I am seeing:
    in the deploy tool dialog:
    distribute: C:\Beginning J2EE 1.4\Ch13\StockServiceApp\StockServiceApp.ear
    deployment started : 0%
    Deploying application in domain failed; Fatal Error from EJB Compiler -- jaxrpc compilation exception
    ; requested operation cannot be completed
    !!! Operation Failed !!!
    !!! With The Following Failure Messages !!!
    Deploying application in domain failed; Fatal Error from EJB Compiler -- jaxrpc compilation exception
    ; requested operation cannot be completed
    Fatal Error from EJB Compiler -- jaxrpc compilation exception
    and in the server log:
    [#|2005-02-01T18:30:47.856-0600|INFO|sun-appserver-pe8.1|javax.enterprise.system.tools.deployment|_ThreadID=12;|DPL5109: EJBC - START of EJBC for [StockServiceApp]|#]
    [#|2005-02-01T18:30:47.856-0600|INFO|sun-appserver-pe8.1|javax.enterprise.system.tools.deployment|_ThreadID=12;|Processing beans ...|#]
    [#|2005-02-01T18:30:47.936-0600|INFO|sun-appserver-pe8.1|javax.enterprise.system.stream.out|_ThreadID=12;|
    error: incorrect fault part name for fault "StockNotFoundException" of operation "sellStocks": "StockNotFoundException"|#]
    [#|2005-02-01T18:30:47.966-0600|INFO|sun-appserver-pe8.1|javax.enterprise.system.tools.deployment|_ThreadID=12;|Total Deployment Time: 1001 msec, Total EJB Compiler Module Time: 0 msec, Portion spent EJB Compiling: 0%|#]
    [#|2005-02-01T18:30:47.966-0600|SEVERE|sun-appserver-pe8.1|javax.enterprise.system.tools.deployment|_ThreadID=12;|Exception occured in J2EEC Phase
    com.sun.enterprise.deployment.backend.IASDeploymentException: Fatal Error from EJB Compiler -- jaxrpc compilation exception
         at com.sun.enterprise.webservice.codegen.JaxRpcRICodegen.accept(JaxRpcRICodegen.java:206)
         at com.sun.enterprise.deployment.EjbBundleDescriptor.visit(EjbBundleDescriptor.java:584)
         at com.sun.enterprise.deployment.Application.visit(Application.java:1333)
         at com.sun.enterprise.webservice.codegen.JaxRpcRICodegen.run(JaxRpcRICodegen.java:103)
         at com.sun.ejb.codegen.IASEJBC.doCompile(IASEJBC.java:785)
         at com.sun.ejb.codegen.IASEJBC.ejbc(IASEJBC.java:563)
         at com.sun.enterprise.deployment.backend.EJBCompiler.preDeployApp(EJBCompiler.java:340)
         at com.sun.enterprise.deployment.backend.EJBCompiler.compile(EJBCompiler.java:209)
         at com.sun.enterprise.deployment.backend.AppDeployer.runEJBC(AppDeployer.java:284)
         at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:176)
         at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:107)
         at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:146)
         at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:71)
         at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:633)
         at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:188)
         at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:520)
         at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:143)
         at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:171)
    |#]
    I would appreciate any pointers to resolving this issue.
    Thanks,
    Satyen

    Can you post the WSDL that was generated by the tool
    for this interface ?I generate the WSDL using "wscompile -define -nd . -classpath ..\build\classes -f:wsi service-config.xml", and here it is:
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="StockService" targetNamespace="urn:stockService" xmlns:tns="urn:stockService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
    <types>
    <schema targetNamespace="urn:stockService" xmlns:tns="urn:stockService" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema">
    <complexType name="StockNotFoundException">
    <sequence>
    <element name="message" type="string" nillable="true"/></sequence></complexType>
    <element name="StockNotFoundException" type="tns:StockNotFoundException"/></schema></types>
    <message name="StockServiceIF_sellStocks">
    <part name="String_1" type="xsd:string"/>
    <part name="int_2" type="xsd:int"/></message>
    <message name="StockServiceIF_sellStocksResponse">
    <part name="result" type="xsd:boolean"/></message>
    <message name="StockNotFoundException">
    <part name="StockNotFoundException" element="tns:StockNotFoundException"/></message>
    <portType name="StockServiceIF">
    <operation name="sellStocks" parameterOrder="String_1 int_2">
    <input message="tns:StockServiceIF_sellStocks"/>
    <output message="tns:StockServiceIF_sellStocksResponse"/>
    <fault name="StockNotFoundException" message="tns:StockNotFoundException"/></operation></portType>
    <binding name="StockServiceIFBinding" type="tns:StockServiceIF">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
    <operation name="sellStocks">
    <soap:operation soapAction=""/>
    <input>
    <soap:body use="literal" namespace="urn:stockService"/></input>
    <output>
    <soap:body use="literal" namespace="urn:stockService"/></output>
    <fault name="StockNotFoundException">
    <soap:fault name="StockNotFoundException" use="literal"/></fault></operation></binding>
    <service name="StockService">
    <port name="StockServiceIFPort" binding="tns:StockServiceIFBinding">
    <soap:address location="REPLACE_WITH_ACTUAL_URL"/></port></service></definitions>
    ---------------------------------------------------------------------------------------------------------

  • Generating Web Service with SOAP Header

    Hello,
    I have a WSDL for a web Service using document encoding and with a soap header.
    I generate a jws file using WL Workshop 81.SP4 but I always have this error message :
    ERROR: AjoutContactService.jws:13: The binding for AjoutContact does not declare one part.
    ERROR:      SUGGESTION: A document literal binding must have at most one part. Make sure you have a WSDL that declares just one part for each message with a document literal binding.
    The header is a recent adding on an existing Web Service, and I can't change the wsdl definition. I also need to use data contained by the header in conjunction with data in the body.
    Is it a limitation with workshop or a problem with with my binding file ?
    I give sample of my two wsdl files.
    Given wsdl file
         <wsdl:message name="inputAjoutContact">
              <wsdl:part name="body" element="xsdin:NouveauContact"/>
    <wsdl:part name="header" element="xsdinhead:EnTeteRequete"/>          
         </wsdl:message>
         <wsdl:message name="outputAjoutContact">
              <wsdl:part name="body" element="xsdout:StatutAjoutContact"/>
         </wsdl:message>
         <wsdl:message name="faultAjoutContact">
              <wsdl:part name="body" element="xsdfault:Exception"/>
         </wsdl:message>
         <wsdl:portType name="AjoutContactPortType">
              <wsdl:operation name="AjoutContact">
                   <wsdl:input name="ParametresEntree" message="tns:inputAjoutContact"/>
                   <wsdl:output name="ParametresSortie" message="tns:outputAjoutContact"/>
                   <wsdl:fault name="ParametresException" message="tns:faultAjoutContact"/>
              </wsdl:operation>
         </wsdl:portType>
    binding file
              <wsdl:operation name="AjoutContact">
                   <soap:operation soapAction="urn:#AjoutContact"/>
                   <input>
    <soap:header part="header" use="literal"/>
    <soap:body parts="body" use="literal"/>
                   </input>
                   <output>
                        <soap:body use="literal"/>
                   </output>
    <fault name="ParametresException">
    <soap:fault use="literal" name="ParametresException" />
    </fault>
         </wsdl:operation>

    Hi,
    This appears to be a known limitation and is addressed by CR227689
    which has a workaround that needs the wsdl to be modified.
    I am not sure if this is possible given that we don't control the wsdl most times.
    Could you please open a BEA support case and refer to CR227689?
    Vimala-
    p.s:
    I found some info on the issue which could help:
    1) Refer to <http://lists.oasis-open.org/archives/regrep/200306/msg00071.html>
    you will see that only one part is allowed in the message part for doc/literal webservices Snippet from the above link
    "Also, keep in mind that WS-I BP permits only one <part> on document/literal messages, so to be WS-I compliant, you would have to include it in the message structure. "
    2) Refer to http://www.ws-i.org/Profiles/Basic/2003-08/BasicProfile-1.0a.html#refinement35722968 <http://www.ws-i.org/Profiles/Basic/2003-08/BasicProfile-1.0a.html>
    below R2208)
    "For document-literal bindings, the Profile requires that at most one part, abstractly defined with the element attribute, be serialized into the soap:Body element."
    This implies Soap body contains message which contains a at most one part.

  • Problem creating Web Service with Wizard

    Hi,
    I have problems in generating a WebService based on my EJB using the Wizard integrated in SAP Dev. Studio (right click on "ejb-jar.xml" -> New -> Web Service in the J2EE DC Explorer)
    In the method selecting screen the methods of my Bean are shown but I can't select any of them (they are not active)!?
    Has anybody a suggestion concerning this?
    Thx a lot

    You have to make sure that the endpoints to your web service are valid endpoints. For help view the documentation at
    http://help.sap.com/saphelp_nw04/helpdata/en/94/91d32be5b8f945a4122ac6119316df/content.htm
    If your endpoints aren't one of the one's listed you'll run into the problem you are describing

  • Generate web service with complexType +sequence with NW Developer Studio

    Hello Sap guru
    I have the following problem with NW04s/SAP NetWeaver Developer Studio 7.0.14
    I wish to create a web service from an existing EJB (stateless session)
    If I send a list of String, everything is OK
    If I wish to return a List of classes instead of strings (same function in the Bean, just a small refinement), I get an empty answer from the deployed web service
    After looking in the forum, it seems that I should not send a List but a class that encapsulate the list in my EJB.
    Even if I make the classes serializable, it does not works (i.e. I get an empty answer when I call the service).
    The VI wizard finds my function but I did not found any way to tell the IDE how is made my objects inserted in the list.
    1)     Have I forgotten something in the building of the VI (or somewhere else)
    2)     Am I using the right way to build a web service? Should I make a WSDL and XSD and creating the required java classes. In this case how can I import the wsdl/xsd in developer studio ? Can I generate a VI form these files ??
    3)     Is there an example that shows what I am trying to do. There must be one but I could not find any

    It is now working
    Regenerating everything form scratch made the stuff working
    From my experience:
    - the function you call in the web service should be available in remote and local interface
    - ArrayList or [] both works. The classes returned inside the List should implement Serializable
    - you do not have anything to change in the VI or any SAP file

  • OSB, web service with GET method

    Hello! Can i create business service which will look at web service which working via GET requests ?

    Ok, it's working now in my case =/
    Proxy service:
    The first step is creating a Conditional Branch. Its properties define the behavior for the method GET.
    >
    Selected Path :      ./ctx:transport/ctx:request/http:http-method/text()
    Variable :      inbound
    Operator: =
    Value: "GET"
    Label: GET
    >
    The second step in the properties of the branch "GET" create a Pipeline Pair.
    In the Request Pipeline create a Stage, inside of which define a pair Assign actions to determine the required variables:
    >
    Assign $inbound/ctx:transport/ctx:request/http:query-string to variable vQueryString
    Assign $inbound/ctx:transport/ctx:request/http:relative-URI/text() to variable vRelativeUri
    >
    The third step. Adding a Route Node after the Pipeline Pair. Its properties specify the necessary parameters.
    Send to the appropriate business service:
    >
    Route to bs_gate_MessagingService
    Request Actions:
    Insert <http:http-method>GET</http:http-method> as first child of ./ctx:transport/ctx:request in variable outbound
    Insert <http:query-string>{$vQueryString}</http:query-string> as first child of ./ctx:transport/ctx:request in variable outbound
    Insert <http:relative-URI>{$vRelativeUri}</http:relative-URI> as first child of ./ctx:transport/ctx:request in variable outbound
    >
    ps_gate_01.proxy.xml:
    >
    <?xml version="1.0" encoding="UTF-8"?>
    <xml-fragment xmlns:ser="http://www.bea.com/wli/sb/services" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:env="http://www.bea.com/wli/config/env" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:con="http://www.bea.com/wli/sb/pipeline/config" xmlns:con1="http://www.bea.com/wli/sb/stages/transform/config" xmlns:con2="http://www.bea.com/wli/sb/stages/config" xmlns:con3="http://www.bea.com/wli/sb/stages/logging/config" xmlns:con4="http://www.bea.com/wli/sb/stages/publish/config">
    <ser:coreEntry isProxy="true" isEnabled="true" isAutoPublish="false" isTracingEnabled="false">
    <ser:description/>
    <ser:binding type="abstract XML" xmlns:con="http://www.bea.com/wli/sb/services/bindings/config"/>
    <ser:monitoring isEnabled="true">
    <ser:aggregationInterval>1</ser:aggregationInterval>
    <ser:pipelineMonitoringLevel>Pipeline</ser:pipelineMonitoringLevel>
    </ser:monitoring>
    <ser:reporting>true</ser:reporting>
    <ser:logging isEnabled="true">
    <ser:logLevel>debug</ser:logLevel>
    </ser:logging>
    <ser:sla-alerting isEnabled="true">
    <ser:alertLevel>normal</ser:alertLevel>
    </ser:sla-alerting>
    <ser:pipeline-alerting isEnabled="true">
    <ser:alertLevel>normal</ser:alertLevel>
    </ser:pipeline-alerting>
    <ser:throttling enabled="false">
    <ser:capacity>0</ser:capacity>
    <ser:maxQueueLength>0</ser:maxQueueLength>
    <ser:timeToLive>0</ser:timeToLive>
    </ser:throttling>
    <ser:messageTracing enabled="true">
    <ser:detailsLevel>Full</ser:detailsLevel>
    <ser:maxSize>8192</ser:maxSize>
    </ser:messageTracing>
    <ser:pageAttachments isEnabled="false"/>
    <ser:transactions isRequired="false" sameTxForResponse="false"/>
    </ser:coreEntry>
    <ser:endpointConfig>
    <tran:provider-id>http</tran:provider-id>
    <tran:inbound>true</tran:inbound>
    <tran:URI>
    <env:value>/project_01/ps_gate_01</env:value>
    </tran:URI>
    <tran:inbound-properties/>
    <tran:all-headers>false</tran:all-headers>
    <tran:provider-specific>
    <http:inbound-properties/>
    </tran:provider-specific>
    </ser:endpointConfig>
    <ser:router>
    <con:pipeline name="PipelinePairNode1_request" type="request">
    <con:stage name="stage1">
    <con:context/>
    <con:actions>
    <con1:assign varName="vQueryString">
    <con2:id>_ActionId-366173683669241693--1c45792f.13813204fcf.-7fa3</con2:id>
    <con1:expr>
    <con:xqueryText xmlns:con="http://www.bea.com/wli/sb/stages/config">$inbound/ctx:transport/ctx:request/http:query-string</con:xqueryText>
    </con1:expr>
    </con1:assign>
    <con1:assign varName="vRelativeUri">
    <con2:id>_ActionId-366173683669241693--1c45792f.13813204fcf.-7fa1</con2:id>
    <con1:expr>
    <con:xqueryText xmlns:con="http://www.bea.com/wli/sb/stages/config">$inbound/ctx:transport/ctx:request/http:relative-URI/text()</con:xqueryText>
    </con1:expr>
    </con1:assign>
    </con:actions>
    </con:stage>
    </con:pipeline>
    <con:pipeline name="PipelinePairNode1_response" type="response"/>
    <con:flow>
    <con:branch-node type="condition" name="HTTP Method Branch">
    <con:comment/>
    <con:context/>
    <con:branch-table variable="inbound">
    <con:xpath>
    <con:xpathText xmlns:con="http://www.bea.com/wli/sb/stages/config">./ctx:transport/ctx:request/http:http-method/text()</con:xpathText>
    </con:xpath>
    <con:branch name="GET">
    <con:operator>equals</con:operator>
    <con:value>"GET"</con:value>
    <con:flow>
    <con:pipeline-node name="PipelinePairNode1">
    <con:request>PipelinePairNode1_request</con:request>
    <con:response>PipelinePairNode1_response</con:response>
    </con:pipeline-node>
    <con:route-node name="RouteNode1">
    <con:context/>
    <con:actions>
    <con5:route xmlns:con5="http://www.bea.com/wli/sb/stages/routing/config">
    <con2:id>_ActionId-366173683669241693--1c45792f.13813204fcf.-7fa9</con2:id>
    <con5:service ref="project_01/bs_gate_MessagingService" xsi:type="ref:BusinessServiceRef" xmlns:ref="http://www.bea.com/wli/sb/reference"/>
    <con5:outboundTransform>
    <con1:insert varName="outbound">
    <con2:id>_ActionId-366173683669241693--1c45792f.13813204fcf.-7fa4</con2:id>
    <con1:location>
    <con:xpathText xmlns:con="http://www.bea.com/wli/sb/stages/config">./ctx:transport/ctx:request</con:xpathText>
    </con1:location>
    <con1:where>first-child</con1:where>
    <con1:expr>
    <con:xqueryText xmlns:con="http://www.bea.com/wli/sb/stages/config">&lt;http:http-method>GET&lt;/http:http-method></con:xqueryText>
    </con1:expr>
    </con1:insert>
    <con1:insert varName="outbound">
    <con2:id>_ActionId-366173683669241693--1c45792f.13813204fcf.-7fa5</con2:id>
    <con1:location>
    <con:xpathText xmlns:con="http://www.bea.com/wli/sb/stages/config">./ctx:transport/ctx:request</con:xpathText>
    </con1:location>
    <con1:where>first-child</con1:where>
    <con1:expr>
    <con:xqueryText xmlns:con="http://www.bea.com/wli/sb/stages/config">&lt;http:query-string>{$vQueryString}&lt;/http:query-string></con:xqueryText>
    </con1:expr>
    </con1:insert>
    <con1:insert varName="outbound">
    <con2:id>_ActionId-366173683669241693--1c45792f.13813204fcf.-7fa2</con2:id>
    <con1:location>
    <con:xpathText xmlns:con="http://www.bea.com/wli/sb/stages/config">./ctx:transport/ctx:request</con:xpathText>
    </con1:location>
    <con1:where>first-child</con1:where>
    <con1:expr>
    <con:xqueryText xmlns:con="http://www.bea.com/wli/sb/stages/config">&lt;http:relative-URI>{$vRelativeUri}&lt;/http:relative-URI></con:xqueryText>
    </con1:expr>
    </con1:insert>
    </con5:outboundTransform>
    <con5:responseTransform/>
    </con5:route>
    </con:actions>
    </con:route-node>
    </con:flow>
    </con:branch>
    <con:branch name="POST">
    <con:operator>equals</con:operator>
    <con:value>"POST"</con:value>
    <con:flow/>
    </con:branch>
    <con:default-branch>
    <con:flow/>
    </con:default-branch>
    </con:branch-table>
    </con:branch-node>
    </con:flow>
    </ser:router>
    <ser:alertRules xsi:nil="true"/>
    </xml-fragment>
    >
    Edited by: 915814 on 17.07.2012 22:22
    How to pass query string values to a Proxy Service
    https://blogs.oracle.com/jeffdavies/entry/enhanced_rest_support_in_oracl

  • URGENT: Rest web service with get method works fine in browser but not with java client(Android)

    Hi ,
    I have created one REST web service which accepts two parameters send back JSON results.
    I tested the it in browser with URL as http://+Inteernal server+/ords/utimes/login_info?p1=+first_param+&p2=+second_para+
    Web service URL :  http://+Inteernal server+/ords/utimes/login_info?p1={p1}&p2={p2}
    But when java team wants to access it from java code it gives error as "400- Bad Request".
    one more IMP thing : when I test it in RESTful web service by using "set bind variable" , it only set value of first parameter.
    APEX version : 4.2
    Database : 11g (XE)
    ords : 2.0.8
    please help me ASAP.
    regards,
    Nagesh Patil

    Hi Pragya,
    thank you for the update.
    Another question: could you please give us any reference about these corrections you told about? Maybe they could be relevant in our case too.
    Our raised incident number is: 3100851983
    Kind regards,
    Davide

  • Web Services with POST Bindings

    Hi,
    I am creating a web service with a method which takes a value from the user and inserts the value into the database .Now the value which is taken is of type 'long' and cannot be sent through the URL.
    As far as my understanding goes, the default SOAP binding that I am using currently uses the HTTP GET method,ie through the URL, to send the SOAP request. But the problem is that my Request is too big and I have to use the HTTP POST method.
    Now, my questions are as follows:
    1.Instead of using the default SOAP binding, can I use the HTTP POST bindings? IF yes, How do I go about it?
    2.Is there a way to specify to the SOAP to use HTTP POST( for example in the 'transport' attribute)?
    Thanks,
    Ramya.

    Normally, Oracle's stack expects a post binding and the SOAP client does it for you this way under the covers [1].
    We did add a get binding so that if you came in via a browser in Oracle9iAS 9.0.3 and OracleAS 10g 9.0.4 and later - we generate a home page and a parameter form from which you can test out the Web service when coming in via a browser.
    What SOAP client are you using? Are you constructing your own SOAP message, using Oracle's SOAP libraries or another package?
    Mike.
    [1]
    Sample SOAP client using Oracle's SOAP libraries
    public String sahHello(String test) throws Exception
    String returnVal = null;
    URL endpointURL = new URL(_endpoint);
    Call call = new Call();
    call.setSOAPTransport(m_httpConnection);
    call.setTargetObjectURI("MyWebService1");
    call.setMethodName("sayHello");
    call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    Vector params = new Vector();
    params.addElement(new Parameter("test", java.lang.String.class, test, null));
    call.setParams(params);
    call.setSOAPMappingRegistry(m_smr);
    Response response = call.invoke(endpointURL, "");
    if (!response.generatedFault())
    Parameter result = response.getReturnValue();
    returnVal = (String)result.getValue();
    else
    Fault fault = response.getFault();
    throw new SOAPException(fault.getFaultCode(), fault.getFaultString());
    return returnVal;

  • Consuming web services with a java application

    Hello,
    I want to consume an ABAP generated web service with a stand-alone Java application. I am very new to this topic and need some hints how this functionality could be achieved.
    How is the web service accessed by the Java application? What about security issues?
    Thank you in advance for your replies! They will be appreciated.
    Kindest regards

    Hi
    See this Help and Examples
    http://help.sap.com/saphelp_nw2004s/helpdata/en/e2/36a53dc1204c64e10000000a114084/frameset.htm
    Kind Regards
    Mukesh

  • Can I call an object with synchronized methods from an EJB

    I have a need for multiple threads (e.g. Message Driven Beans) to access a shared object, lets say a singleton, I'm aware of the "you can't have a singleton in the EJB world" issues) for read/write operations, so the operations will need to be synchronised.
    I've seen various statements such as you can't use read/write static fields in EJBs and you can't use synchronisation primitives in EJBs but I've also seen statements that say its okay to access utility classes such as Vector (which has synchronised methods) from an EJB.
    Does anyone know if there is a definitive answer on this? What are the implications of accessing a shared object with synchronised methods from multiple EJBs? Is it just that the EJB's thread may block which limits the ability of the container to manage the EJBs? In the Vector example above (from Professional Java Server Programming) did they mean its okay to use these utility classes provided they aren't shared across threads?
    If I can't use a plain old Java Object does anyone know if there are other potential solutions for sharing objects across EJBs?
    In my problem, I have an operation that I want to run in a multi-threaded way. Each thread will add information to the shared object, and this info may be used by the other threads. There's no lengthy blocking as such other than the fact that only one thread can be adding/reading information from the shared object at a time.
    I've trawled through this forum looking for similar questions of which there seem to be many, but there doesn't seem to be any definitive answers (sorry if there was and I missed it).
    Thanks
    Martin

    You can share objects among EJB's or among objects used by one or more EJB's. You can use synchronization primitives - nothing will prevent you from doing that.
    After all, the container classes, JVM-provides classes, JDBC, JCA, JNDI and other such classes do all of this with impunity. You can too. You can use file and socket I/O as well, presuming you configure the security profile to allow it. Should you? Well it depends on what you need to accomplish and if there is another practical alternative.
    Yes the specification warns you not to, but you cannot be responsible for the interior hidden implementation of classes provided to you by the JVM or third parties so you can never truly know if your are breaking these written rules.
    But when you do these things, you are taking over some part of the role of the container. For short running methods that only block while another thread is using the method or code block and no I/O or use of other potentially blocking operations are contained in the method/block, you will be fine. If you don't watch out and create deadlocks, you will harm the container and its managed thread pool.
    You should not define EJB methods as synchronized.
    Also, if you share objects between EJB's, you need to realize that the container is free to isolate pools of your EJB in separate classloaders or JVM's. It's behavior can be influenced by your packaging choices (use of .ear, multiple separate .jar's, etc.) and the configuration of the server esp. use of clustering. This will cause duplicate sets of shared classes - so singletons will not necessarily be singleton across the entire server/cluster, but no single EJB instance will see more than one of them. You design needs to be tolerant of that fact in order to work correctly.
    This isn't the definitive answer you asked for - I'll leave that to the language/spec lawyers out there. But in my experience I have run across a number of occasions where I had to go outside of the written rules and ave yet to be burned for it.
    Chuck

  • How to use generated code from "Import Web Services" with Cairngorm Framework

    I recently downloaded Flex Builder 3 beta 2 and tried out the
    wizard that lets you import web services. The code that is
    auto-generated makes if fairly straight forward to consume web
    services using the object types defined in the WSDL. No longer does
    the developer need to decode the XML payload! The only problem I am
    having is how does you integrate the auto- generated code with the
    Cairngorm framework? This seems like a huge question for anyone who
    might want to leverage Cairngorm and the auto-generated proxy code
    in the same project (like me).
    Here are the problems that I see so far.
    1) How do you configure the generated service class to work
    with the Cairngorm service locator? The service constructor only
    accepts a “LCDS destination string” which implies that
    you must use Lifecycle data services. Unfortunately, the project I
    am trying to retrofit currently uses a WebService and does not use
    data services. All I really need to do is change the endpoint URL
    (ie from local to a development server). This issue is noted in the
    bug https://bugs.adobe.com/jira/browse/FB-8456. What I think is
    needed is a way to set the endpointURI in the Services.mxml file.
    2) Even if I come up with a hack around #1, I do not receive
    a callback to my IResponder even though I register it immediately
    after the method call. I can register and listener function within
    my business delegate and receive the callback, but my Command
    object, which implements IResponder, does not receive the call back
    even though it is registered. From what I read in the ASDocs it
    should but it doesn’t for me!
    These are the issues I have observed in 3 hours of messing
    with this. I hope this makes sense. I would love to integrate
    auto-generated web service proxies into Cairngorm but I don’t
    see a straight forward way without re-architecting Cairngorm. Has
    any one else run across this issue? If so, do you have any insights
    on how to proceed? Any help is appreciated.

    Since I posted this question, I have abandoned the notion of
    auto-generated web services and embraced the good old FDS concept
    where the RemoteObject meta-tag does all the conversion work for
    me. We are now using the Granite DS package and it is working well
    for us. I would love to consume web services, but it just isn't
    worth the hassle when all you have to do with Granite (and FDS) is
    cast your return objects to the proper object type.
    BTW, since this posting, I have investigated competing Flex
    app frameworks. After my research, I checked out the PureMVC
    framework. Wow!! Cairngorm always left me with an uneasy feeling
    and I guess I am not alone. Apparently, Cliff Hall felt the same
    way. That is why he started the project. I like his approach alot
    more than Cairngorm especially since it includes notifications
    which allow me to broadcast my own app level events independent
    from the AS Event framework. Check out PureMVC. For what it is
    worth, it has my humble endorsement. Cliff was even gracious enough
    to acknowledge the other Adobe Consulting guys for their work. Good
    for you Cliff, I respect that. Check out a better way at
    http://www.puremvc.org/

  • Have problem when generate Web Service from bapi function

    Dear all,
    Please kindly help me about generating Web Service from BAPI function, It does not success only this attached function.
    I have done so many function without any problems.
    I found 1 case that I use specific variable to be an import/ export then, it can't create as well.
    As for this one, I try so many changes but I can't success it as well.
    This is my function on R/3 4.6C, Dot net connector 2.0, Dot net Frame Work 1.1.
    FUNCTION Z_BAPI_ATTACHMENT_CREATE.
    ""Local interface: Type: Remote-enabled module
    *"  IMPORTING
    *"     VALUE(P_BOTYPE) LIKE  BORIDENT-OBJTYPE
    *"     VALUE(P_BO_ID) LIKE  BORIDENT-OBJKEY
    *"     VALUE(P_MSGTYP) LIKE  SOFM-DOCTP
    *"     VALUE(P_DOCTY) LIKE  BORIDENT-OBJTYPE
    *"     VALUE(P_RELTYP) LIKE  BRELTYP-RELTYPE
    *"     VALUE(P_FNAME) LIKE  RLGRAP-FILENAME
    *"     VALUE(P_OBJDES) TYPE  SO_OBJ_DES
    *"  EXPORTING
    *"     VALUE(RETURNMESSAGE) TYPE  CHAR50
    INCLUDE : <cntn01>.
    P_BOTYPE  TYPE  BORIDENT-OBJTYPE DEFAULT 'BUS2105'
    P_BO_ID   TYPE  BORIDENT-OBJKEY
    P_MSGTYPE TYPE  SOFM-DOCTP DEFAULT 'URL'
    P_DOCTY   TYPE  BORIDENT-OBJTYPE DEFAULT 'MESSAGE'
    P_RELTYP  TYPE  BRELTYP-RELTYPE DEFAULT 'ATTA'
    P_FNAME   TYPE  RLGRAP-FILENAME
    P_OBJDES  TYPE  SO_OBJ_DES
    TYPES: BEGIN OF ty_message_key,
    foltp TYPE so_fol_tp,
    folyr TYPE so_fol_yr,
    folno TYPE so_fol_no,
    doctp TYPE so_doc_tp,
    docyr TYPE so_doc_yr,
    docno TYPE so_doc_no,
    fortp TYPE so_for_tp,
    foryr TYPE so_for_yr,
    forno TYPE so_for_no,
    END OF ty_message_key.
    DATA : lv_message_key TYPE ty_message_key.
    DATA : lo_message TYPE swc_object.
    DATA : lt_doc_content TYPE STANDARD TABLE OF soli-line
    WITH HEADER LINE.
    First derive the Attachment's ( MESSAGE )document type.
    p_docty = 'MESSAGE'.
    CASE p_reltyp.
    In case of URls
      WHEN 'URL'.
        p_msgtyp = 'URL'.
    In case of Notes / Private Notes
      WHEN 'NOTE' OR 'PNOT'.
        p_msgtyp = 'RAW'.
      WHEN 'ATTA'.
    Take given parameter e.g. 'DOC', 'PDF' etc.
    P_MSGTYP = 'EXT'.
      WHEN OTHERS.
    ....exit
        EXIT.
    ENDCASE.
    Create an initial instance of BO 'MESSAGE' - to call the
    instance-independent method 'Create'.
    swc_create_object lo_message 'MESSAGE' lv_message_key.
    define container to pass the parameter values to the method call
    in next step.
    swc_container lt_message_container.
    Populate container with parameters for method
    swc_set_element lt_message_container 'DOCUMENTTITLE' p_objdes.
    swc_set_element lt_message_container 'DOCUMENTLANGU' 'E'.
    swc_set_element lt_message_container 'NO_DIALOG' 'X'.
    swc_set_element lt_message_container 'DOCUMENTNAME' p_docty.
    swc_set_element lt_message_container 'DOCUMENTTYPE' p_msgtyp.
    In case of URLs..it should be concatenated with &KEY& in the begining.
    CASE p_msgtyp.
      WHEN 'URL'.
      lt_doc_content = '&KEY&http://www.rmtiwari.com' .
        CONCATENATE '&KEY&' p_fname INTO lt_doc_content.
        APPEND lt_doc_content.
    In case of Notes or Private Notes, get the data from files on appl
    server or from wherever(? - remember background).
      WHEN 'RAW'.
        lt_doc_content = p_fname.
        APPEND lt_doc_content.
    In case of PC File attachments
      WHEN OTHERS.
        OPEN DATASET p_fname FOR INPUT IN BINARY MODE.
        IF sy-subrc EQ 0.
          DO.
            READ DATASET p_fname INTO lt_doc_content.           "2 of 27
            IF sy-subrc EQ 0.
              APPEND lt_doc_content.
            ELSE.
              EXIT.
            ENDIF.
          ENDDO.
          CLOSE DATASET p_fname.
        ENDIF.
    ENDCASE.
    'DocumentContent' is a multi-line element ( itab ).
    swc_set_table lt_message_container 'DocumentContent' lt_doc_content.
    Size is required in case of File attachments
    DATA : lv_doc_size TYPE i.
    DATA : l_file_lines TYPE i.
    DESCRIBE TABLE lt_doc_content LINES l_file_lines.
    READ TABLE lt_doc_content INDEX l_file_lines.
    lv_doc_size = ( 255 * ( l_file_lines - 1 ) ) +
    STRLEN( lt_doc_content ).
    swc_set_element lt_message_container 'DOCUMENTSIZE' lv_doc_size .
    Refresh to get the reference of create 'MESSAGE' object for attachment
    swc_refresh_object lo_message.
    swc_call_method lo_message 'CREATE' lt_message_container.
    Get Key of new object
    swc_get_object_key lo_message lv_message_key.
    Now we have attachment as a business object instance. We can now
    attach it to our main business object instance.
    Create main BO object_a
    data: LO_IS_OBJECT_A type SIBFLPORB. "type SIBFLPORB is unknown, so I
    DATA: lo_is_object_a TYPE borident.
    lo_is_object_a-objkey = p_bo_id.
    lo_is_object_a-objtype = p_botype.
    LO_IS_OBJECT_A-CATID = 'BO'.
    Create attachment BO object_b
    data: LO_IS_OBJECT_B type SIBFLPORB. "type SIBFLPORB is unknown
    DATA: lo_is_object_b TYPE borident.
    lo_is_object_b-objkey = lv_message_key.
    lo_is_object_b-objtype = p_docty.
    LO_IS_OBJECT_B-CATID = 'BO'.
    *TRY.
    *CALL METHOD CL_BINARY_RELATION=&gtCREATE_LINK
    EXPORTING
    IS_OBJECT_A = LO_IS_OBJECT_A
    IS_OBJECT_B = LO_IS_OBJECT_B
    IP_RELTYPE = P_RELTYP.
    CALL FUNCTION 'BINARY_RELATION_CREATE'
      EXPORTING
        obj_rolea    = lo_is_object_a
        obj_roleb    = lo_is_object_b
        relationtype = p_reltyp
      EXCEPTIONS
        OTHERS       = 1.
    Check if everything OK...who cares!!
    COMMIT WORK.
    if sy-subrc = 0.
      RETURNMESSAGE = 'S-Success'.
    else.
      RETURNMESSAGE = 'E-Error'.
    endif.
    ENDFUNCTION.
    Thanks in advance,
    Benjawan
    Edited by: Nitipat Chadchavalpanichaya on Oct 20, 2008 9:02 AM

    There is no any error message show up. It just the class
    Z_BAPI_ATTACHMENT_CREATE  doesn't create autometically as normal. I showed you as below.
    That means I can't call class z_bapi_attachment_create.
    ' <autogenerated>
    '     This code was generated by a SAP. NET Connector Proxy Generator Version 2.0
    '     Created at 21/10/2551
    '     Created from Windows
    '     Changes to this file may cause incorrect behavior and will be lost if
    '     the code is regenerated.
    ' </autogenerated>
    Imports System
    Imports System.Text
    Imports System.Collections
    Imports System.ComponentModel
    Imports System.Runtime.InteropServices
    Imports System.Xml.Serialization
    Imports System.Web.Services
    Imports System.Web.Services.Description
    Imports System.Web.Services.Protocols
    Imports SAP.Connector
      '@ <summary>
      '@ Client SAP proxy class
      '@ </summary>
      <WebServiceBinding(Name:="dummy.Binding", Namespace:="urn:sap-com:document:sap:rfc:functions")> _
      Public Class PRAttachment
        Inherits SAPClient
        '@ <summary>
        '@ Initializes a new PRAttachment.
        '@ </summary>
        Public Sub New()
        End Sub
        '@ <summary>
        '@ Initializes a new PRAttachment with a new connection based on the specified connection string.
        '@ </summary>
        '@ <param name="connectionString">A connection string (e.g. RFC or URL) specifying the system where the proxy should connect to.</param>
        Public Sub New(ByVal ConnectionString As String)
          MyBase.New(ConnectionString)
        End Sub
        '@ <summary>
        '@ Initializes a new PRAttachment and adds it to the given container.
        '@ This allows automated connection mananged by VS component designer:
        '@ If container is disposed, it will also dispose this SAPClient instance,
        '@ which will dispose a contained connection if needed.
        '@ </summary>
        '@ <param name="Cont">The container where the new SAPClient instance is to be added.</param>
        Public Sub New(ByVal Cont As Container)
          MyBase.New(Cont)
        End Sub
      End Class

Maybe you are looking for