Example for calling document type service using a XML

Hi,
Can anybody give me some pointers to any examples about Document type webservice
that is passed an XML document? The service expects a custom java object.
I am running WLS 7.0 with sp2.
This is what i have done so far:
I have created a document type web-service with the following signature
public CustomReturnObject provideService(customParameter) { }
The 'customParameter' is based on a "CustomParameter.xsd" and 'CustomReturnObject'
is based on its schema. I ran the "autotype" to generate the java classes for
the schema.
Now, we would like to invoke the service by passing an XML document instead of
calling it by creating instances of "CustomParameter" java class. Also we would
like to get the XML represented by "CustomReturnObject" in the client program
instead of the java object.
Can anybody help?
Thanks
Raghu

The latest version of WLS is 8.1.
I think the the "endpoint" needs to be string.
String endpoint =
http://RASUBR-2K:7001/SubscriptionServicesWS/SSApplicationService.jws;
Regards,
-manoj.
http://manojc.com
"Raghu Subramaniam" <[email protected]> wrote in message
news:[email protected]...
>
SAAJ did work!
But it is not working with the BEA client libraries (WLS 8.0 Beta). I amgetting
the following exception
exception ejava.lang.IllegalArgumentException: endpoint shou
ld be String or URL
java.lang.IllegalArgumentException: endpoint should be String or URL
atweblogic.webservice.core.soap.SOAPConnectionImpl.call(SOAPConnectionI
mpl.java:43)
at TestMain.main(TestMain.java:51)
Attached is my test file.
I used the libraries from Sun's web services kit and it works.
Is it a known problem? Any fixes?
Raghu
"manoj cheenath" <[email protected]> wrote:
SAAJ will work. You can also use DII client with
generic type mapping. Check this out:
http://manojc.com/tutorial/sample27/Main.java
Regards,
-manoj
http://manojc.com
"Raghu Subramaniam" <[email protected]> wrote in message
news:[email protected]...
But how did you call the web service. Did you use the stubs in yourclient
code?
We don't want to use the stubs generated from "clientgen". Rather wantto
call
the service by passing a XML string that adheres to our schema expectedby
our
service. Our service is document-style.
I am trying to use the SAAJ api to generate a SOAPMessage and callthe
service.
Anybody has tried this before. Does it work?
Raghu
"Mike DeAngelo" <[email protected]> wrote:
I just did this the first time a few weeks ago, but I had some
gotchas...
>>>>
First, run the autotype ant task against your xsd file to generateyour
value
objects (I think you already did this).
Second, write your java class or EJB to use the value objects asparameter/return
type. (I think you did this too.) If you are going to invoke anEJB,
create
the EJB-Jar file.
Third, use the servicegen ant task to create the an ear file. Theear
file will
contain both the ejb-jar and file webservice.war which is generatedby
weblogic.
Fourth, unbundle the ear file, then unbundle the war file. Edit the
file WEB-INF/web-service.xml
Add the contents of your original xsd under the <types> element (iftypes
doesn't
exist, it should be the first subelement under the root element).Add
the contents
of types.xml (generated by autotype) to the <type-mapping> element(It
should
be the second element under the root element.
Rebundle the war file, rebundle the ear file, and deploy it.
Here is a fragment of the ant stuff...
<taskdef name="servicegen"
classname="weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask"/>
<target name="check-servicegen" depends="stage">
<uptodate property="servicegen.notRequired"
targetfile="${stage}/my_webservice.ear"
srcfile="${stage}/my_ejb.jar">
</uptodate>
</target>
<target name="servicegen"
depends="check-servicegen"
unless="servicegen.notRequired">
<servicegen destEar="${stage}/my_webservice.ear"
warName="my_webservice.war">
<classpath refid="compile.classpath"/>
<service ejbJar="${stage}/my_ejb.jar"
targetNamespace="http://foo/bar/baz"
serviceName="process"
serviceURI="/process"
generateTypes="False"
expandMethods="True"
style="document">
</service>
</servicegen>
</target>
Mike
"Raghu Subramaniam" <[email protected]> wrote:
Hi,
Can anybody give me some pointers to any examples about Document
type
webservice
that is passed an XML document? The service expects a custom javaobject.
I am running WLS 7.0 with sp2.
This is what i have done so far:
I have created a document type web-service with the following
signature
>>>>>
public CustomReturnObject provideService(customParameter) { }
The 'customParameter' is based on a "CustomParameter.xsd" and'CustomReturnObject'
is based on its schema. I ran the "autotype" to generate the javaclasses
for
the schema.
Now, we would like to invoke the service by passing an XML documentinstead
of
calling it by creating instances of "CustomParameter" java class.
Also
we would
like to get the XML represented by "CustomReturnObject" in the client
program
instead of the java object.
Can anybody help?
Thanks
Raghu

Similar Messages

  • Service group for particular document type or Purchase Organisation

    Dear Gurus,
    I want to add service group as like Material group. but my objective is to restrict those service group for particular document type or Purchase Organisation??
    Is it possible, if so please advice me the SPRO Settings
    Thanks
    RS

    Hi,
    Basically, this task (both customized table activation via SE11 transaction and user exit activation via SE37 transaction) will be done by ABAPer.  All you should do is to prepare the functional specs document in which you require -
    1)   A generation and activation of the customized table which consists of at least four columns -
         a)   Purchasing Organization;
         b)   Purchasing Document Type;
         c)   Material group/service group
         d)   Purchasing Document Creation Date
    2)   A coding and activation of the related function module (You can use SMOD transaction to view the enhancement MM06E005 to view related user exit).
    Cheers,
    HT

  • For a particular document type posting using FB50/F-02 should be restricted

    Hi all,
    I have a requirement that, for a particular document type posting using FB50/F-02 should be restricted.
    Any idea?
    Thanks,

    Hi,
    what Exactly i need to write in validation is...
    PREREQUISITE.
    company code eq '0001' or '0002' or '0003'.
    and doc type 'XX'.
    CHECK
    data: l_flag type c.
    check action eq 'BU'.    "only when clicked on 'post' in FB50
    Import l_flag from memory id 'YMMID'.
    if l_flag eq ''.
    endif.
    message
    'Doc cann't be posted'.
    Is it possible to write above code in validation?

  • [SOLVED] Call an esb service using PL/SQL utl_http

    I would like to call an esb service using the UTL_HTTP package but I'm always getting the following exception: ORA-29266: end-of-body reached.
    My ESB uses an xml document as input-parameter and I'm not defining this in my procedure, how can I use a document-style parameter when calling the webservice.
    Could someboy point me out how to accomplish this functionality?
    If tried the examples about bpel procedures and utl_dbws and these work for bpel processes but not for esb services.

    Hi aprt of my article:
    http://orasoa.blogspot.com/2006/10/calling-bpel-process-from-raw-plsql.html
    Can you call the ESB service with the SOAPUi.org tool? If this works, than you must create the same request from PLSQL.
    Marc

  • Document type service

    We are trying to create a document type service meaning we want to transmit a document
    as is. The webservices documentation states:
    "RPC-oriented WebLogic Web service operations use SOAP encoding. Document-oriented
    WebLogic Web service operations use literal encoding."
    Our service method signature is:
    public void processCreditApp(String document)
    We change our web-services.xml to include: style="document" in the web-service
    element and invocation-style="one-way" in the operation element.
    The client generated builds a SOAP message with the body content typed as a string:
    <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <env:Body>
    <xsd:string>HelloWorld</xsd:string>
    </env:Body>
    </env:Envelope>
    We had expected the content of the body not to be typed with <xsd:string> tags.
    Likewise
    the generated web service is expecting this typing.
    Have the corect assumptions about "literal encoding"? Have we left out any necessary
    steps or settings?
    We are using WL 7, service pack 2 with the pathch: CR102544_70sp2_v2.jar.

    I am not sure I understand. The SOAP body we receive does not have a type designation:
    <SOAP:Body>
    <diag:Diagnostic
    xmlns:diag="http://www.someName.com/namespace.messaging.diag#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <diag:DiagnosticMessage>
         <diag:RequestMessage>HelloWorld</diag:RequestMessage>
    </diag:DiagnosticMessage>
         <diag:SourceIdentifier>MySource</diag:SourceIdentifier>
    </diag:Diagnostic>
    </SOAP:Body>
    How can we map types for this?
    Steve
    "Karthik V" <[email protected]> wrote:
    Just by changing "rpc" to "document" in web-services.xml will not help.
    You missed <types> and <type-mapping> elements.
    I guess your <operation> still has input param type as xsd:string.
    You should change this to new type that you create to represent your
    document.
    Alternatively, you could servicegen with style="document" and take a
    look
    at the generated web-services.xml.
    That will give you a better idea.
    /k
    "Steve Watson" <[email protected]> wrote in message
    news:[email protected]...
    We are trying to create a document type service meaning we want totransmit a document
    as is. The webservices documentation states:
    "RPC-oriented WebLogic Web service operations use SOAP encoding.Document-oriented
    WebLogic Web service operations use literal encoding."
    Our service method signature is:
    public void processCreditApp(String document)
    We change our web-services.xml to include: style="document" in theweb-service
    element and invocation-style="one-way" in the operation element.
    The client generated builds a SOAP message with the body content typedas
    a string:
    <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <env:Body>
    <xsd:string>HelloWorld</xsd:string>
    </env:Body>
    </env:Envelope>
    We had expected the content of the body not to be typed with <xsd:string>tags.
    Likewise
    the generated web service is expecting this typing.
    Have the corect assumptions about "literal encoding"? Have we leftout
    any necessary
    steps or settings?
    We are using WL 7, service pack 2 with the pathch: CR102544_70sp2_v2.jar.

  • How to Customize a document type to use on CV01N transaction in SAP

    I am trying to create a attach document in CV01N but I want to set up a new document type and don't want to use existing ones, so can some one help me in how to configure new document type and also please tell everything in step by step in order to xcomplete this process successfully.

    HI,
    1. Define Number Ranges for Document Numbers
    T code OD00
    SPRO / IMG -> Cross - Application Component -> Document Management System -> Control Data -> Define Number Ranges for Document Numbers
    2. Define Document Type
    T code DC10
    SPRO / IMG -> Cross - Application Component -> Document Management System -> Control Data -> Define Document Types.
    In this step, you create Document Type for categorize documents according to the organizational procedures.
    Supppose u define ZAD
    Document Type The document type is used to categorize documents according to the organizational procedures. E.g. in company, there exists many departments for which separate document types have been created. For example, ZAD,ZCB,ZCD etc Document type is a three digit alphanumeric field.
    Document Type Description  Description appears in the screen heading when document info record is being processed.
    Use Kpro  Indicator controls that the original files are stored in defined content repository via Knowledge Provider.
    Assignment of Revision Level This indicator shows that a revision level is automatically assigned to a document the first time the document is released with reference to a change number.
    CM Relevance u2018  u2018 u2013 Not Relevant for Configuration Management
    u20181u2019 u2013 Relevant for Configuration Management
    Determines whether Configuration Management controls the object.
    Number Exit   MCDOKZNR  Program that controls number assignment and version numbering for documents.
    Regards,
    Pardeep Malik

  • Output for PO document type

    I have created 4 document types in PO
    Domestic, Import, Service, Subcontracting,
    I have to add extra one document type and i want the print out of this document type should be different from remaining 4
    only for this 5th document type i need to have different output..
    Is it possible in SAP

    Hi,
    You should have different document types for all process( Domestic, Import, Service, Subcontracting and 5th one) and can have one output type for all document type ( where you have one  SmartForm)  OR you can have different output types( five SmartForm ) for each document type.Just talk to ABAPer for inclusion of all PO output formats with all condition types.
    Regards,
    Biju K

  • How to add a default user group for multiple document type's?

    Hi,
    I am trying to add same default user group for different document types when MA is created. Is there any way to setup using a single "Document Security Template"? Or I need to create different templates for different document types?
    Please confirm.
    Thanks,
    Saloni

    Hi Saloni,
    Based on what your specific requirement, it might be easier to do it with scripting.
    If you are doing it using Document Security Templates, you would have to create a Document Security Template for each of the 6 MA types and assign the default group. Create another one and leave the Document Type field blank, so it will apply to the other 4 MA types that don't have a default group.
    Regards,
    Vikram

  • PO Output message types for different document types

    Hi,
    I wanted the system automatically generate the messages whenever a PO is created for different document types like NB,UB,Blanketorder, Pilot run.
    These are the steps i did...plz advice any more steps to make this work
    1. the output type I am using is NEU-purchase order
    2. I have created condition records for document types NB,UB,PR etc
    I was sucessfull in getting the messages automatically for the standard(NB) PO..but not for the other document types
    Plz advice me how I can achieve this with further configurations
    Thanks
    SKid

    If you have created conditin record for all the document type in MN04 then it should work becuase doc type has nothing to do for printing config.
    this is basically a condition record.
    check your condition record

  • Multiple Number Ranges for AP Document Type not getting triggered

    Hi all,
    We are posting receivables in the system using BAPI_CTRACDOCUMENT_CREATE. We have huge data of 3.9 million records for which receivables has to be posted. So multiple number ranges has been configured in the system for AP document type.
    The issue is even though multiple number ranges for mass processing are configured in the below location in SPRO, none of them are getting triggered. The number range at the first level on the screen is only getting triggered, due to this it is taking lot of time to post documents. Any help on this?
    Financial Accounting(new)
         Contracts Accounts Receivable and Payables
         BasicFunctions
         Postings and Documents
         Document
         Maintain Document Assignments
         Document Types
         Maintain Document Types and Assign Number Ranges
    Regards,
    Karthick.

    Karthick:
    Mass ranges are only used for FICA parallel mass activities.  For your situation, you can define and assign multiple ranges for individual processing in the same IMG activity.  Those would then be chosen for your mass postings.
    regards,
    bill.

  • Calling two Business service using split join in osb

    Hi,
    While trying to call two business service using Split Join in osb i am getting selection failure message in Bpel em console. i am using invoke activity to invoke the BS and assign to assign the input. in the assign i am assigning *$request.payload/input* to input.payload . In the em console i am getting input like this
    receiveInput
    Jun 19, 2012 5:05:45 PM Received "process" call from partner "bpelprocess1_client"
    <payload>
    <inputVariable>
    <part name="payload">
    <client:process>xxxxx</client:process>
    </part>
    </inputVariable>
    Assign (pending)
    Jun 19, 2012 5:05:48 PM Error in evaluate <from> expression at line "65". The result is empty for the XPath expression : "/client:process/client:input".
    <payload>
    <client:process>xxxxxx</client:process>
    Jun 19, 2012 5:05:48 PM The following exception occurred while attempting to execute operation copy at line 63
    <payload>
    <bpelFault>
    <faultType>0</faultType>
    <selectionFailure/>
    </bpelFault>
    Jun 19, 2012 5:05:57 PM "BPELFault" has not been caught by a catch block.
    Jun 19, 2012 5:06:00 PM The transaction was rolled back. The work performed for bpel instance "650002" was rolled back, but the audit trail has been saved for this instance.If this is a sync request, please resubmit the request from the client. If it is an async request, please recover from the recovery console by resubmitting the invoke message.
    Can anyone help on this?
    Thanks in Advance...

    maybe this one helps a bit, it's the same pattern
    http://www.xenta.nl/blog/2011/07/03/oracle-service-bus-implementing-aggregator-pattern-by-use-of-split-join/
    if you're using a dynamic split join easiest way is to do something like
    assing <yourresponse/> to $response
    at this moment your assign an empty placeholder to the response variable
    now you go into the for-each looping and for each iteration you need to insert the response of your bpel call in the $response variable
    so in the looping as last step you add something like
    insert $mybpelresponse/rootelement into $response/yourresponse
    with the insert it will insert the reponse 1..x times into the $response variable (so actually aggregating all the responses for you)

  • No. range for WA document type

    Hi All,
    Its a client requirement that they want to create No. Range for WA document type for each plant... we have more 300 plants all over india... how to achieve this.. plz suggest any user exit i need to use
    Thanks

    You can use functional module MB_CREATE_MATERIAL_DOCUMENT by using Z table.
    Check the similar discussion for more details Number range for MIGO and MIRO at plant level.
    Regards
    Dev

  • Sales Document Type : Services

    Hi Sap Gurus,
    Can anybody tell me how Sales Document Type Services is handled as a end user & what is the configuration for the same.
    Thanx in advance
    Regards
    Nitin Date

    http://help.sap.com/bp_bblibrary/600/BBlibrary_start.htm
    in above link select H29 building block

  • Number range table for MM document types

    hi
    Can anybody help me to find the number range for the mm document types.
    Regards
    rajeev

    Hi,
    go to transaction SPRO, Materials Management, then choose one of the following:
    Purchasing or
    External Services Management or
    Logistics Invoice Verification or
    Inventory Management and Physical Inventory
    and look for the document types you would like to customize.
    Like within purchasing for purchase order -> Define Number Ranges. In this step, you maintain the number ranges for the following purchasing documents:
    RFQ/quotation
    Purchase order
    Contract
    Scheduling agreement
    After that you can add the number ranges to the document types under Define Document Types. ...
    Please be more specific next time as MM document types can relate to 4 main areas within MM.
    Regards,
    Edit

  • Release Stategies for a document type

    Hello Gurus,
       Is there any bapi that I can use to display the release codes applicable for a document type? For a PR perhaps?
    Thanks,
    Jeffrey

    Hi Senthil
    Try this Link it might of some use to you
    http://www.sap123.com/showthread.php?t=59
    Regards
    Jagadish

Maybe you are looking for

  • A big cup of "zip it" or the definative final P67 vs X58 answer thread

    none of this will matter in 6 months however until then... this should be a sticky 2600K, Motherboard, 16gig ram $711 990x, motherboard, 12 gig ram $1408  24Gig ram $1552 why the 990x? its the only processor that can match or beat the 2600k either st

  • ITunes wont open up from internet explorer or firefox... Cant verify email

    I recently made a iTunes store account and received the verification email, but when i click the link, it says opening iTunes please wait or something... So i wait and nothing happends. I tried to log in but it tells me to verify email again. Help pl

  • Running Acrobat inside Virtual IE 9

    Our computers have Internet Explorer 11 and Acrobat XI installed. We have a single web application that requires IE 9. So I virtualized IE 9 using a template, no problem there. While running the web application in virtual IE 9 it needs to open pdf fi

  • Connecting 2 macs permanently

    I have a power mac and a powerbook and i want to set them up so that i can access the powerbook HD from my powermac all the time. I do this now but i have to go in the findernetwork powerbook Computer and mount the volume, but when the powerbook goes

  • Find latest photo in album reading ApertureData.xml

    I'd like to read ApertureData.xml or any other file that can tell me the date of the latest photo I've added to an Aperture project. I don't want any Photostream photos included. Thanks for any suggestions.