OSB Setting SOAP Body Id value in proxy service when calling out to another service

I have a proxy service deployed in OSB.  I need to set the Id attribute value on the SOAP Body element to a specific value prior to invoking the business service.
In the service callout I currently has  "Configure Payload Document" selected.
Do I need to do an XPath / XQuery transformation in an Insert or Update message processing action in a prior step of the message flow before the callout to the business service?

Suppose below is your request you are passing to Business Service :
<math:input
xmlns:math="http://www.math.org">
    <math:inp1>100</math:inp1>
    <math:inp2>1</math:inp2>
    </math:input>
Now before passing it to BS you need to change the value of inp2 to let say 200.
So just before service callout , add a replace action
Replace [ node contents ] of [ ./math:input/math:inp2 ] in [ body ] with [ 200 ]
Your new request will become:
<math:input
xmlns:math="http://www.math.org">
<math:inp1>100</math:inp1>
<math:inp2>200</math:inp2>
</math:input>
Hope this helps.
Regards,
Karan
Oracle Fusion Middleware Blog

Similar Messages

  • 1)     When call center Team creates Service Request/Service Order/  Complaints it should be set as High Priority by default.

    Hello team ,this is my requirement ..   Through customizing..
    When call center Team creates Service Request/Service Order/  Complaints it should be set as High Priority by default...we need to set only interaction agent bussiness role priority only HIGH..only for this bussiness role.through customizing how to do it..what are the steps..through customizing only please.. help

    By customizing, you can set a default priority to a given transaction type.
    But this does not depend on the business role.
    But as you are talking about IC agents, maybe you can check IDI for this purpose, because there are actions like "Set Problem Priority", "Set Service Request Priority" or "Set Service Order Priority".
    Best regards,
    Sylvain AGUETTAZ

  • HT201436 I have an iPhone 4s and have set up with my provider for voicemail. however, when called my phone does not switch to voicemail. How do I set the phone to transfer to voicemail when not answered etc?

    I have an iPhone 4s and have set up with my provider for voicemail. however, when called my phone does not switch to voicemail. How do I set the phone to transfer to voicemail when not answered etc?

    Voicemail is a carrier feature, not a phone feature. This has to be fixed by your carrier, so contact them, as obviously, voicemail is not properly provisioned on your account.

  • Error when calling an external web service (blank soap action)

    I did a lot of searching on this message and did not find an answer. Most of the issues i found related to XI/PI, which we are not using.
    There is a web service created outside of SAP for which i generated (from the WSDL) a proxy class in my DEV system, client 050, a few years ago. This was subsequently moved to QA and production, and all is working fine.
    Now, i want the same web service to work in client 100. I created the logical port, and the RFC destination, but when i try to call the web service, i get the following error
    Server did not recognize the value of HTTP Header SOAPAction
    Since only the basis group around here can access the logical port definition,and rfc destination, i have no idea where this information should be set up. I should not have to reimport the WSDL, since the proxy was imported from DEV to QA and it is working in QA client 050. There is something i need to set up, specific to client 100, and i am missing it. I looked in SOAMANAGER, and i didnt see anything even set up  there for client 050, so i did set up anything for client 100.
    Any help would be appreciated.

    I tried adding the web reference in a console app and works fine. In the plugins this can't be done, because the plugins are deploy in database.
    I tried another basic test using ChannelFactory. Only want to retrieve some entity through the external web services:
    IPluginExecutionContext context = localContext.PluginExecutionContext;
    IOrganizationService service = localContext.OrganizationService;
    ITracingService tracer = localContext.TracingService;
    try
    BasicHttpBinding binding = new BasicHttpBinding();
    binding.Name = "BasicHttpBinding_IAxxisWcfServices";
    binding.Security.Mode = BasicHttpSecurityMode.None;
    binding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.None;
    binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
    EndpointAddress endpoint = new EndpointAddress(@"http://*****.svc");
    ChannelFactory<IAxxisWcfServices> factory = new ChannelFactory<IAxxisWcfServices>(binding, endpoint);
    IAxxisWcfServices channel = factory.CreateChannel();
    var entity = channel.FindByEntities(new CRM.Application.Context.Dtos.Asegurado( { CrmGuid = "7C3E96C6-C3BC-E411-80DF-0A736AE14667" }, null, new CRM.Framework.Session() { User = "***", Password = "***" });
    catch (Exception ex)
    throw new InvalidPluginExecutionException(ex.Message);
    That test threw the following exception on the GenericParameterAttributes of channelType of factory object:
    http://s27.postimg.org/4wf3er8up/Error.png

  • Place Holder values are not displaying when calling the report

    Hi,
    I have a Place holder column in my report and i am assigning the values in a formula column. When i run the report from report builder place holder column is showing the value. But when i deploy the same in application server and i try to invoke from a form it is not the value of that place holder column. Why is this happening? Please, help me in resolving the same.
    Thanks & Rgds,
    M T

    Yes Gayatri. You are right. When i run the report from report builder it is working perfectly. The same report i deployed in application server and invoking from a form report is not showing the values for place holder columns.
    Why is this happening?
    How to resolve it?

  • ORA-06502 PL/SQL: numeric or value error ORA-06512 when calling a procedure

    Hi,
    I have been using ODP.net for a while now and have been calling lots of procedures without issue, however today I put together one to insert key, value parameters into a simple table and it is failing on me Intermittently with the ORA-06502... I have checked the code and I do not see any problems and am thoroughly frustrated... When I call the procedure directly it all works perfectly so the problem is not in the db!
    Please can you help? Code follows:
    Table defined as:
    CREATE TABLE REPORT_REQUEST_PARAMETERS
    (     REQUEST_ID NUMBER,
         PARAM_NAME VARCHAR2(50 BYTE),
         PARAM_VALUE VARCHAR2(255 BYTE)
    Stored procedure defined as:
    create or replace PROCEDURE SP_WRITE_REQUEST_PARAMS
    ( in_request_id number, in_param_name char, in_param_value char )
    AS
    BEGIN
    INSERT INTO REPORT_REQUEST_PARAMETERS ( REQUEST_ID, PARAM_NAME, PARAM_VALUE )
    VALUES
    ( in_request_id, in_param_name, in_param_value );
    END SP_WRITE_REQUEST_PARAMS;
    Finally the ODP.net code which calls this looks like:
    using (OracleConnection connection = new OracleConnection(...blah...))
    using (OracleCommand command = connection.CreateCommand())
    command.CommandType = CommandType.StoredProcedure;
    command.CommandText = "SP_WRITE_REQUEST_PARAMS";
    OracleParameter p1 = new OracleParameter("in_request_id", OracleDbType.Int32);
    OracleParameter p2 = new OracleParameter("in_param_name", OracleDbType.Char);
    OracleParameter p3 = new OracleParameter("in_param_value", OracleDbType.Char);
    p1.Direction = ParameterDirection.Input;
    p1.Value = requestId;
    p2.Direction = ParameterDirection.Input;
    p2.Size = paramName.Length;
    p2.Value = paramName;
    p3.Direction = ParameterDirection.Input;
    p3.Size = paramValue.Length;
    p3.Value = paramValue;
    command.Parameters.Add(p1);
    command.Parameters.Add(p2);
    command.Parameters.Add(p3);
    connection.Open();
    command.ExecuteNonQuery();
    connection.Close();
    }

    What version of database? If it's 9206 this is a known database problem, and should be resolved by patching the database to 9208. I don't have the bug number handy though.
    Simply because it succeeded in sqlplus doesnt mean it's not a database problem, as the problem was intermittent and succeeded from odp sometimes too.
    Thanks
    Greg

  • Custom Field values are not saved. when MPP imported from another instance.

    Hello Mate-
    Currently I am merging one small instance (I2) of PWA in our corporate instance(I1). as the corporate instance is huge, we are doing manual merge of groups, securities, users, custom fields etc. also downloading the MPP as xml from I2 and then planned
    to publish from I1.
    There are few project level custom fields which are being used in MPP. and those fields may have formulas too.
    I created same custom field in crporate environment(I1) but while trying to open the projects in our corporate environment(I1), the project custom fields are gone.
    Could you please guide me here, I am lost. I can not do a data base migration ans it would override all data from I1 instance so need to do it manually.
    Many thanks
    Deb
    Dev EPM Consultant

    Hi
    You may not be able to do this as the custom field GUID's are different in both the instance.
    You may write a macro to copy the custom field data from one to another one
    refer :http://msdn.microsoft.com/en-us/library/office/ff867798(v=office.15).aspx
    --Happy Troubleshooting
    Thanks --Ajith

  • Sap mii JRA proxy error when calling a BAPI

    Hi everyone,
    I am trying to connect SAP Netweaver (MII JAVA Stack only) to ECC via JRA. Everything was right (deployment and configuration) but when developers try to call a BAPI the following error appears:
    JRAProxy error. Entry not found.
    Could you please help on that.
    Thanks in advance.

    Hi Herman
    I am also facing same issue if you have resolved above issue please reply me regarding same.
    Regards,
    Manoj Bilthare

  • JDeveloper 10.1.3 - Disabling ns0: namespace prefix in soap body children ?

    I am attempting to use a PeopleSoft web service. However, the PeopleSoft web service does not recognize operations which have a namespace prefix. Using visual studio, namespace prefixes are not used in the child elements of the soap body element. I am able to call the service using visual studio.
    JDeveloper 10.1.3 uses a namespace prefix for children of the body element which is recommended by the soap spec. However, I need to disable that behavior so that I can actually get the program working with PeopleSoft.
    Can anyone tell me if there is an easy way to disable the ns0: prefix that is used by the generated web service proxy stub? I have traced through the generated proxy code but I do not see any properties that can be modified. The only thing I can think of is to modify the generated code but I do not want to go that route.
    Thanks,
    Rich

    Delete the NS0: related text, in JDev, from your WSDL and it should work. I had the same problem with .NET not liking it also.
    Keep in mind you'll have to tweak the WSDL again if you regenerate it.
    You sure you're using 10.1.3? I upgraded and it shows the NS0: as a problem in existing projects. I'm working on the latest, production download so maybe it's been corrected.

  • OSB- Any Soap type Proxy service URL issue.

    Hi,
    There is an issue which i am facing and stuggling with it for sometime :(
    Requirement - Using OSB 11g i had created 12 different services based on WSDLs provided by the client and all of them are working fine.However the client wanted a OSB router service on top of these 12 services which wil search for a string in the input xml and then route it to the required Proxy service (amongst the 12 services developed).
    Problem- I was able to create the router Proxy service which was a Any Soap type of proxy service as i didnot have a WSDL for the router service.The router service is working fine when we test it from the OSB console.
    When We tried to test the flow from SOAPUI (we used the WSDL of one of the 12 webservices developed and modified the uri to the uri of the router service ie. http://hostname:port/router/routerProxy) and it does not work.
    The error returned is ERROR 404 nothing found by this name.
    As The router proxy is a Any Soap kind of service i do not have the option of providing the client with the WSDL.
    I would want to know how to i call this router service from an external source like SOAPUI so that the client is able to hit it.Also what would be the end point uri of this router service ?
    Kindly Help
    Thanks
    Pranav Shah

    Hi anuj,
    Here you have the configuration
    <?xml version="1.0" encoding="UTF-8"?>
    <xml-fragment xmlns:ser="http://www.bea.com/wli/sb/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:env="http://www.bea.com/wli/config/env" xmlns:con="http://www.bea.com/wli/sb/pipeline/config" xmlns:con1="http://www.bea.com/wli/sb/stages/routing/config" xmlns:con2="http://www.bea.com/wli/sb/stages/config" xmlns:con3="http://www.bea.com/wli/sb/stages/transform/config">
    <ser:coreEntry isProxy="true" isEnabled="false" isAutoPublish="false" isTracingEnabled="false">
    <ser:description/>
    <ser:binding type="abstract SOAP" xsi:type="con:AnySoapBindingType" isSoap12="false" xmlns:con="http://www.bea.com/wli/sb/services/bindings/config"/>
    <ser:monitoring isEnabled="false">
    <ser:aggregationInterval>10</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:ws-policy>
    <ser:binding-mode>service-policy-bindings</ser:binding-mode>
    <ser:policies/>
    </ser:ws-policy>
    <ser:throttling enabled="false">
    <ser:capacity>0</ser:capacity>
    <ser:maxQueueLength>0</ser:maxQueueLength>
    <ser:timeToLive>0</ser:timeToLive>
    </ser:throttling>
    <ser:messageTracing enabled="false">
    <ser:detailsLevel>Terse</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>/testRouter/test</env:value>
    </tran:URI>
    <tran:inbound-properties/>
    <tran:all-headers>true</tran:all-headers>
    <tran:provider-specific xsi:type="http:HttpEndPointConfiguration" xmlns:http="http://www.bea.com/wli/sb/transports/http">
    <http:inbound-properties/>
    </tran:provider-specific>
    </ser:endpointConfig>
    <ser:router>
    <con:flow>
    <con:route-node name="RouteNode1">
    <con:context/>
    <con:actions>
    <con3:ifThenElse>
    <con2:id>_ActionId-9110389481588294027-8fc6726.12c833ed7e1.-7c90</con2:id>
    <con3:case>
    <con3:condition>
    <con:xqueryText xmlns:con="http://www.bea.com/wli/sb/stages/config">fn:contains(fn-bea:serialize($body), 'ImsersoSiebelContactInsert')</con:xqueryText>
    </con3:condition>
    <con3:actions>
    <con1:route>
    <con2:id>_ActionId-9110389481588294027-8fc6726.12c833ed7e1.-7c8f</con2:id>
    <con1:service ref="ServiWebEntrada/AltaExpediente/ProxyService/AltaExpedienteProxyService" xsi:type="ref:ProxyRef" xmlns:ref="http://www.bea.com/wli/sb/reference"/>
    <con1:operation>ImsersoSiebelContactInsert</con1:operation>
    <con1:outboundTransform/>
    <con1:responseTransform/>
    </con1:route>
    </con3:actions>
    </con3:case>
    <con3:case>
    <con3:condition>
    <con:xqueryText xmlns:con="http://www.bea.com/wli/sb/stages/config">fn:contains(fn-bea:serialize($body), 'CreaContacto')</con:xqueryText>
    </con3:condition>
    <con3:actions>
    <con1:route>
    <con2:id>_ActionId-9110389481588294027-8fc6726.12c833ed7e1.-7c8b</con2:id>
    <con1:service ref="ServiWebEntrada/CuidContact/ProxyService/CuidContactProxyService" xsi:type="ref:ProxyRef" xmlns:ref="http://www.bea.com/wli/sb/reference"/>
    <con1:operation>CreaContacto</con1:operation>
    <con1:outboundTransform/>
    <con1:responseTransform/>
    </con1:route>
    </con3:actions>
    </con3:case>
    </con3:ifThenElse>
    </con:actions>
    </con:route-node>
    </con:flow>
    </ser:router>
    </xml-fragment>
    Regards
    Pranav

  • OSB 11g - Authentication - Username and password in SOAP body

    Hi,
    I have a PS based on the WSDL provided by the client. According to the WSDL the client will send the username and password (to be used for authentication) in SOAP Body. I have extract the username and password from the body and authenticate it and then only process the data.
    The approach I am thinking of is to create two PS. The first PS will be called by client to send the data. There will be no authentication required for this PS. Once this PS (PS-1) receives the message it will extract the username, password and data from the SOAP body. It will then set the username and password in the HTTP header of the second PS (PS-2) and the data in the SOAP body of PS-2.
    PS-2 will be under basic authentication. PS-2 will accept the data as the only payload. Upon receiving the data it will do the normal processing.
    But I do not see any way to set the HTTP header (Authorization) for the second PS. Is my approach correct? Is there another/better approach?
    I went through this link [http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/security/model.html] and found that we may have to configure another Authentication provider. How to do that?
    Thanks,
    Sanjay

    Hi Sanjay,
    Your approach seems correct to me (using two proxies) but instead of setting the username and password in HTTP header, you may set it as SOAP header and use Custom Authentication method in OSB. To know more about it, please refer -
    http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15866/message_level_cust_auth.htm#i1069719
    Regards,
    Anuj

  • How to set SOAP Header When Calling Business Service (OSB) Using Split-Join

    Hi,
    We need to call WSDL based webservice which requires heading static content for successful call. As we need to call the same service parallely, hence we want to use Split-Join.
    Looked at couple of forum links, noted that we can't play with headers while working with Split-Join.
    For curiosity, just want to check any option other than using proxy as mediator in setting header information.
    Regards
    Venkata Madhu

    Venkata,
    You still have the option, if you hv n't tried this one.
    To enable this capability, you must declare the header parts along with the body parts in a single request/response message in the Split-Join WSDL and in the WSDL of the proxy or business services invoked by the Split-Join. With the message parts declared in the WSDLs, SOAP header content is available to Split-Joins in the request/response message variables.
    Following is an example of the message and binding definitions in the WSDL.
    Message
    <wsdl:message name="retrieveCustomerOverviewByIdRequestMessage">
    <wsdl:part name="retrieveCustomerOverviewByIdRequest"
    element="co:retrieveCustomerOverviewByIdRequest"/>
    *<wsdl:part name="serviceContext" element="sc:serviceContext"/>*
    </wsdl:message>
    Binding
    <wsdl:input>
    <soap:body use="literal" parts="retrieveCustomerOverviewByIdRequest"/>
    *<soap:header message="tns:retrieveCustomerOverviewByIdRequestMessage"part="serviceContext" use="literal"/>*
    </wsdl:input>
    hope it helps !!
    Regards,
    Abhinav

  • OSB - Setting http Authorization header with Proxy Service

    Hi,
    I have the following scenario:
    PS1 -> PS2 -> BS (with a SA configured to pass through)
    I need to set the Authorization http header based on some information in payload, so:
    PS1 receives the payload and route to PS2, where username/password are extracted and using a java call out the base64 hash is generated.
    In the PS2 route i'm trying to set the Authorization header using the set Transport Headers option.
    When i do a request to test this operation, osb show me a beautiful CredentialNotFound exception.
    I have tryied to set the Authorization header in the route on the PS1, without success.
    Someone can help me ?

    I can't set the Proxy Service to do the authentication. I will try to explain better:
    I have a Business Service which have a Service Account associated to pass through the Authorization header to the service provider do the validation.
    I front of this business service i have a Proxy Service which route the requests to the BS.
    All partners send this Authorization header, but now, i have one that will not send no matter what.
    The username and passwrod will come into the payload (and will be variable).
    In some point before the proccess i need to extract the information from payload and set the Authorization header.
    Ty for you time.
    Edited by: GSanches on 09/07/2010 09:59

  • Extract fields from the SOAP body during mapping

    Hi all,
    I have an Abap Proxy to SOAP scenario with a main payload and an attachment. During mapping I need the reference of the attachment to store the reference in the main payload. I don't need the attachment itself.
    SOAP-Body:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Eingangs-Message
      -->
    - <SAP:Manifest xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="wsuid-manifest-5CABE13F5C59AB7FE10000000A1551F7">
    - <SAP:Payload xlink:href="cid:payload-E742FF47D930DE5CE1000000C107826A @sap.com">
      <SAP:Name>MainDocument</SAP:Name>
      <SAP:Description />
      <SAP:Type>Application</SAP:Type>
      </SAP:Payload>
    - <SAP:Payload xlink:href="cid:payload-EE42FF47D930DE5CE1000000C107826A @sap.com">
      <SAP:Name>hugo.txt</SAP:Name>
      <SAP:Description />
      <SAP:Type>ApplicationAttachment</SAP:Type>
      </SAP:Payload>
      </SAP:Manifest>
    I need the attachment reference as string inside my main payload: cid:payload-EE42FF47D930DE5CE1000000C107826A @sap.com
    I wrote an user defined function to select the MessageId, but the MessageId is only part of the reference to the main payload.
    String constant;
    java.util.Map map;
    map = container.getTransformationParameters();
    constant = (String) map.get(StreamTransformationConstants.MESSAGE_ID);
    return constant;
    Has anybody an idea to get the reference of the attachment from the SOAP body with an user defined function or an adapter module?
    Thanks and kind regards
    Frank

    Hello,
    thank you all for the information. I found a solution for my problem on the sender side. I wrote an own helper class with  the method create_attach_from_txt_withref. This method  build an attachment with an own reference and write the reference back to the payload.
    This reference will not be changed within the execute_asynchronous method of the proxy.
    Method parameters:
    P_DATA        Importing   Type     STRING
    P_TYPE        Importing   Type     STRING
    P_NAME        Importing   Type     STRING
    P_ATTACHMENT  Exporting   Type Ref IF_AI_ATTACHMENT
    P_AREF        Exporting   Type     STRING
    Method coding:
    METHOD create_attach_from_txt_withref.
      DATA: lo_attachment TYPE REF TO cl_ai_attachment,
            l_payload     TYPE REF TO if_xms_payload,
            l_pref        TYPE        sxms_mf_s,
            l_guid        TYPE        guid_32,
            l_aref        TYPE        string.
      CLASS cl_ai_factory DEFINITION LOAD.
    " create the attachment
      p_attachment = cl_ai_factory=>create_attachment_from_text(
                    p_data = p_data             " attachment data
                    p_type = p_type             " attachment type
                    p_name = p_name ).          " attachment name
    " we need an implementing class of the interface if_ai_attachment
      lo_attachment ?= p_attachment.
    " get the new payload
      l_payload = lo_attachment->get_payload( ).
    " get the reference of the payload
      l_pref = l_payload->getreference( ).
    " build an own reference
      CALL FUNCTION 'GUID_CREATE'
        IMPORTING
          ev_guid_32 = l_guid.
      CONCATENATE 'payload-' l_guid '@sap.com' INTO l_aref.
      CONCATENATE 'cid:'     l_aref            INTO l_pref-href.
    " set our own reference
      l_payload->setreference( reference = l_pref ).
    " write back the modified payload
      lo_attachment->set_payload( p_payload = l_payload ).
    " return of the reference
      p_aref = l_aref.
    ENDMETHOD.
    If anybody has an idea how to read the soap body within an adapter module please let me know.
    Regards
    Frank

  • Can't create SOAP body

    I've taken the schema for SOAP and can create an envelope, a header and a body
    with no data content. But now I can't add content; I can't create put anything
    in the body.
    It appears you can only set a Body with a Body object, but I want to put my XML/string
    into the body. Seems easy in theory, but I can't figure out how to do it. I tried
    parsing the content using a BodyDocument, but that created a fragment and I got
    weird errors:
    XmlValueNotNillableException
    or
    Tree copy contents NYI
    Help!
    Ken.

    I think all my problems were because I had old xmlBeans and interfaces. Simple
    set() methods worked, but any attempt to set a complex type failed. I just recompiled
    my schemas and tried again and it worked. The new beans have addNewXXX() methods;
    the old beans had ensureXXX() methods. Now I'm cooking with gas. ;->
    Ken.
    "Ken Kress" <[email protected]> wrote:
    >
    Eric,
    Samir passed along the suggestion to call the addBody method, but
    there is no such method in the soap interfaces I have.
    I got the schema for SOAP from: http://www.w3.org/2001/09/soap-envelope
    and compiled it. The interfaces the Body portion only list Factory methods
    of
    newInstance, parse, load, newValidatingXMLInputStream and coerce.
    The envelope has ensureBody and setBody methods, but I haven't figured
    how how
    to use them. For instance, if I do this:
    envelope.ensureHeader();
    Body tmpBody = envelope.ensureBody();
    // add the Body
    envelope.setBody( tmpBody );
    I get:
    Exception in thread "main" java.lang.RuntimeException: Tree copy contents
    NYI
    at com.bea.xbean.values.XmlObjectBase.set(XmlObjectBase.java:1480)
    at com.bea.xbean.schema.ComplexTypeMethodHandler.invoke(ComplexTypeMetho
    dHandler.java:512)
    at com.bea.xbean.schema.SchemaTypeImpl.executeComplexTypeMethod(SchemaTy
    peImpl.java:1552)
    at com.bea.xbean.values.XmlObjectBase.invoke(XmlObjectBase.java:1030)
    at $Proxy1.setBody(Unknown Source)
    at MMIMain2.buildEnvelope(MMIMain2.java:129)
    at MMIMain2.printLogonRequest(MMIMain2.java:89)
    at MMIMain2.main(MMIMain2.java:70)
    The same thing happens if I try to create my own body and then use setBody.
    Ken.
    "Eric Vasilik" <[email protected]> wrote:
    Sounds like you may want to use XmlCursor. If you get the XmlObject
    corresponding
    to the body, call newCursor(). This will return an XmlCursor whichcan
    be positioned
    insode the body (it is initiall positioned just outside the body). Then,
    create
    another cursor on the content you want to place inside the body andcall
    move()
    or copy() on the source cursor, passing the destination cursor. This
    will move/copy
    the stuff you want in the body to the body.
    "Ken Kress" <[email protected]> wrote:
    I've taken the schema for SOAP and can create an envelope, a headerand
    a body
    with no data content. But now I can't add content; I can't create put
    anything
    in the body.
    It appears you can only set a Body with a Body object, but I want to
    put my XML/string
    into the body. Seems easy in theory, but I can't figure out how to
    do
    it. I tried
    parsing the content using a BodyDocument, but that created a fragment
    and I got
    weird errors:
    XmlValueNotNillableException
    or
    Tree copy contents NYI
    Help!
    Ken.

Maybe you are looking for