Web service accepting array of object

I am new to JDev and ADF, we have requirement to build a web service which can receive array of object. Basically there is a Dot Net service which will read email account from exchange server and send all the read emails by consuming our web service. So the dot net program can send more than one email from the account and send to our web service. As of now we have created the web service which accepts the parameters like
@WebMethod
public String createHdaFile(@WebParam(name = "sender") String sender,
@WebParam(name = "primaryRecipient") String primaryRecipitant,
@WebParam(name = "secondaryRecipient") String secondaryRecipitant,
@WebParam(name = "subject") String subject,
@WebParam(name = "messageBody") String messageBody,
@WebParam(name = "attachmentName") String attachmentName
code ...
Want to know is there a way we can accept array of object which can receive all emails in one go.
Thanks,
Rajiv

I am new to JDev and ADF, we have requirement to build a web service which can receive array of object. Basically there is a Dot Net service which will read email account from exchange server and send all the read emails by consuming our web service. So the dot net program can send more than one email from the account and send to our web service. As of now we have created the web service which accepts the parameters like
@WebMethod
public String createHdaFile(@WebParam(name = "sender") String sender,
@WebParam(name = "primaryRecipient") String primaryRecipitant,
@WebParam(name = "secondaryRecipient") String secondaryRecipitant,
@WebParam(name = "subject") String subject,
@WebParam(name = "messageBody") String messageBody,
@WebParam(name = "attachmentName") String attachmentName
code ...
Want to know is there a way we can accept array of object which can receive all emails in one go.
Thanks,
Rajiv

Similar Messages

  • Web Service Request Collection/Complex Objects doesn't work

    I am unable to call a .net web service using Adobe LiveCycle Designer 8.0. My test web service accepts either a complex object or a collection of the same object.
    EX)
    [WebMethod]
    public string CostChange(CostChangeNotificationItem change1, CostChangeNotificationItem change2)
    return "Success";
    [WebMethod]
    public string CostChangeColl(CostChangeNotificationCol changes)
    return "Success";
    I can successfullly create the connection to the web service. When i drag and drop the connection request/button/and response onto the designer i can call the web service successfully.
    However you never see the request objects on the form unless you change the subforms to flowed and the min and initial count of the object to 1. When this is done the web service never gets called. You can click the button until you are blue in the face with no successful call.

    Hello ,
    our problem was a result of a corrupt database. Please check the Log files in CUCM . have a look for "missed table entries "
    cli
    utils dbreplication repair
    check logs again    the path to the log is displayed after the repair.
    hope it helps
    good luck

  • Invoking a AXIS Web Service with a Java object as input argument

    Hi
    I've been trying to execute a bpel process that invokes a web service deployed through axis.
    This web service takes a java object as input argument as opposed to data types that are directly mapped to java types through the SOAP engine.
    I deployed and tested the service outside of BPEL using a test client class. Everything works well.
    When I try to configure the "Assign" and "Invoke" activities so that service can be invoked, I cannot see the data structure through the variable picker and I see the following message:
    "The element {urn:ComplexTypeWebService}TimeSheetBean is not know to the schema container. Perhaps a schema file that uses it needs to include or import its definition.There mat also be an XML schema issue (non resolvable schema) which prevents {urn:ComplexTypeWebService}TimeSheetBean from being seen by the schema processor."
    Is there any example that demonstrates how to invoke an axis web service in such scenario? What am I doing wrong?
    Please, let me know.

    The passing of Java objects in and out of a web service is NOT supported. variables must be xml documents defined by a XML schema. In my opinion, missing Java object and WSDL is not a good idea. -Edwin

  • SAP Cloud Application Studio Create Custom Web Service From Custom Business Object and Consume in External System

    Hi Experts,
    I have requirement to create custom business object and create Web Service for that and use in external system (SAP ECC / SAP CRM / Third Party).
    1) Is it possible to create custom object web service and used in external system ?
    2) When we create the Web service from custom business object what the necessary steps(action : Create , Read , Update) require?
    3) Sample Scenario :
    My Custom Business Object
    businessobject Custom_Integration {
      element EP_VAL1 : LANGUAGEINDEPENDENT_MEDIUM_Text;
      element EP_VAL2 : LANGUAGEINDEPENDENT_MEDIUM_Text;
      element IP_RES : LANGUAGEINDEPENDENT_MEDIUM_Text;
    I have created the Web Service using this custom business object.
    3) How i can use this web service in external system? what are the prerequisite steps in external system to consume this service in it?
    Please anyone have idea about this how to do this and how to achieve this using SDK and custom business object.
    Many Thanks
    Mithun

    Hello Mithun,
    Does this section in the documentation help you:
    SAP Cloud Applications Studio Help -> Developers Desktop -> Web Services
    The entry "Task -> Create a Web Service" describes how to create a Web Service on your own BO
    The entry "Task -> Test a Web Service" helps you how you can use it in a foreign tool / application.
    HTH,
       Horst

  • Can we create a Web Service from a Business Object??

    Hello All,
    Has anyone created a Web Service using a Business Object?
    When I am trying to create a Web Service in TM box, I can see that couple of options like Business Objects, Process Agents are disabled and rest like Consumer Group, Service Provider are enabled. Any idea why this is happening. Is this related to some configuration setting.
    Regards,
    Abhishek

    please elaborate in which environment or case you are creating Web Service from Business Object.As per my understanding we generally create web service through Wizard.
    Thanks
    Snehasish

  • Create a web service according to business object 'BUS2012'

    Hi,
    I want to create a web service according to business object 'BUS2012'.But I can't finish it using wizard.System always tell me 'Time limit exceeded.'Who can give me any idea?
    Thanks & Regards
    Kelvin

    Hi ,
    check this article in the site :****************
    Regards,
    Suryanarayana

  • Problem with web service that returns an object with a String that have som

    Hi everybody:
    I have a problem with a web service I am doing, I have made a web service that returns a collection of objects, the objects have a set of properties, there is one property that is a String,this property consists in a text fragment that could have some characters that are considered special in XML like &, <, >, " and that's why when I execute the service from a client an exception is thrown:
    {code}
    Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Could not read XML stream.. Nested exception is com.ctc.wstx.exc.WstxParsingException: Expected a text token, got START_ELEMENT.
    at [row,col {unknown-source}]: [9,646]
    org.codehaus.xfire.fault.XFireFault: Could not read XML stream.. Nested exception is com.ctc.wstx.exc.WstxParsingException: Expected a text token, got START_ELEMENT.
    at [row,col {unknown-source}]: [9,646]
    at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
    at org.codehaus.xfire.client.Client.onReceive(Client.java:410)
    at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)
    at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
    at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
    at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
    at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
    at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
    at org.codehaus.xfire.client.Client.invoke(Client.java:336)
    at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
    at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
    at $Proxy0.search(Unknown Source)
    at cu.co.cenatav.webservices.client.Client.main(Client.java:26)
    {code}
    I know that this is happening because special characters are sent by the soap message but I don't know how to solve this problem.
    How could I avoid this exception ?
    I hope you can help me.
    Regards.
    Ariel

    Hi,
    BPEL and BPEL PM do not have a good support for SOAPENC-Array: it would be very difficult to create such an array in BPEL or to receive it and manipulate it.
    The (unfortunately very intrusive) work around is to change the WSDL of the service to use a XML type defined using XML schema. This is all the more painful that JDev 9.0.4 does not have strong support for complex types.
    In general though, I would highly recommend this best practice:
    1) Start by define the WSDL contract first
    2) Then generate the server side skeleton to implement it
    3) Use BPEL as the client to this contract.
    By starting with the contract first, you make sure that 1) your interfaces are clean and coarse grained.
    2) things like java objects, sessions, etc to not leak through the interface (which would be the worst thing that could happen because it would closely link the client and the server.
    Sorry for not being more helpful. This will get radically cleaner in Oracle AS 10.1.3.
    Edwin

  • Invoking Web Service with array paramter

    Hi,
    I'm trying to invoke a Java web service having an array as input parameter but it only works if i have only one child or if i chose one specific element with xpath.
    bpel variables:
    <variables>
    <variable name="mergedSupps" element="client:suppliers"/>
    <variable name="Invoke_1_getRating_InputVariable" messageType="ns1:getRating"/>
    <variable name="Invoke_1_getRating_OutputVariable" messageType="ns1:getRatingResponse"/>
    </variables>
    this works:
    <assign name="Assign_1">
    <copy>
    <from variable="mergedSupps" query="/client:suppliers/client:suppID[1]"/>
    <to variable="Invoke_1_getRating_InputVariable" part="parameters" query="/ns1:getRating/suppID"/>
    </copy>
    </assign>
    does not work:
    <assign name="Assign_1">
    <copy>
    <from variable="mergedSupps" query="/client:suppliers/client:suppID"/>
    <to variable="Invoke_1_getRating_InputVariable" part="parameters" query="/ns1:getRating/suppID"/>
    </copy>
    </assign>
    wsdl:
    <element name="suppliers" type="client:supplierType"/>
    <element name="procRatingTestProcessRequest" type="client:requestType"/>
                   <element name="procRatingTestProcessResponse" type="client:responseType"/>
         <complexType name="requestType">
    <sequence>
                                  <element name="suppliers" type="client:supplierType"/>
                             </sequence>
                        </complexType>
                   <complexType name="supplierType">
         <sequence>
                                  <element name="suppID" type="string" maxOccurs="unbounded"/>
                             </sequence>
                        </complexType>
                        <complexType name="responseType">
                             <sequence>
                                  <element name="rating" type="double"/>
                             </sequence>
                        </complexType>
    java:
    @WebMethod
    public double getRating(@WebParam(name= "suppID") String[] s) {
    anyone can help?????

    Sorry i was trying around too much, it was empty some other time ;)
    when i try:
    <assign name="Assign_1">
    <copy>
    <from variable="mergedSupps" query="/client:suppliers/client:suppID"/>
    <to variable="Invoke_1_getRating_InputVariable" part="parameters" query="/ns1:getRating/suppID"/>
    </copy>
    </assign>
    i get:
    <selectionFailure>
    <part name="summary" >
    <summary>
    XPath query string returns multiple nodes. According to BPEL4WS spec 1.1 section 14.3, The assign activity part and query /client:suppliers/client:suppID should not return multipe nodes. Please check the BPEL source at line number "70" and verify the part and xpath query /client:suppliers/client:suppID.</summary>
    </part>
    </selectionFailure>

  • Weblogic - a web service with java.lang.Object parameter

    hi all,
    i'm creating a web service with a java.lang.Object parameter.
    my question is as follows:
    when a client calls the web service, how to i get the soap message object and convert it to soap message string using the parameter?
    thanks,
    alex

    Here's some code from one of the Axis samples, this shows the basic process of making a call:
    package samples.message;
    import org.apache.axis.client.Service;
    import org.apache.axis.client.Call;
    import org.apache.axis.message.SOAPBodyElement;
    import org.apache.axis.utils.Options;
    import org.apache.axis.utils.XMLUtils;
    import org.w3c.dom.Element;
    import java.net.URL;
    import java.util.Vector;
    public class TestMsg {
    public String doit(String[] args) throws Exception {
    Options opts = new Options(args);
    opts.setDefaultURL("http://localhost:8080/axis/services/MessageService");
    Service service = new Service();
    Call call = (Call) service.createCall();
    call.setTargetEndpointAddress( new URL(opts.getURL()) );
    SOAPBodyElement[] input = new SOAPBodyElement[2];
    input[0] = new SOAPBodyElement(XMLUtils.StringToElement("urn:foo",
    "e1", "Hello"));
    input[1] = new SOAPBodyElement(XMLUtils.StringToElement("urn:foo",
    "e1", "World"));
    Vector elems = (Vector) call.invoke( input );
    SOAPBodyElement elem = null ;
    Element e = null ;
    elem = (SOAPBodyElement) elems.get(0);
    e = elem.getAsDOM();
    String str = "Res elem[0]=" + XMLUtils.ElementToString(e);
    elem = (SOAPBodyElement) elems.get(1);
    e = elem.getAsDOM();
    str = str + "Res elem[1]=" + XMLUtils.ElementToString(e);
    return( str );
    public static void main(String[] args) throws Exception {
    String res = (new TestMsg()).doit(args);
    System.out.println(res);

  • Web Service not returning Boolean objects from DTO class

    Hi,
    I've seen posts reporting the same problem on other forums from a few years ago that are unresolved.
    I've created a service in NDS that has a method that returns some data via a DTO class. All the data is returned apart from those that are of type java.lang.Boolean. I thought the method names might be causing the problem so created a "get" method as well as an "is" method but it is still being ignored.
    I have tested this using the Portal Web Service Navigator and by using the service in Visual Composer 7.
    Is there a problem with Boolean data types in SAP Web Services ?
    Thanks
    Gary

    Hi Rich,
    No. In fact what happens is that in the se80 case, it returns 29 lines of results and in the wsadmin case it returns 25 lines of results. The web service/function module actually executes unit tests remotely by doing an RFC from the development system to the test system (where the unit tests are executed). In the se80 case, for one object, the unit tests execute correctly. In the wsadmin, the unit tests for that object don't execute hence returning less lines of result.
    In both cases, the users used to log in the web service or se80 are the same and the users for the RFC are the same.
    Thank you for your insight.
    Regards,
    Philon

  • Web Services as Background Callable Objects?

    Hi everybody,
    is it possible to use an Web Service as an Background Callable Object? And if it is possible, how can I do it?
    For your background: If the Web Service throws an Exception, I want to handle it. My goal: The next step after finalizing the exception handler action will be the
    action (WebService) that reported the exception. Or is there any other possibility? 
    Thanks,
    Stefan

    Hi Stefan,
    For repeating the WS Call after the exception handler, you can use the "repeat" strategy. When defining the exception handler, you can choose between "continue" and "repeat".
    Check this page : <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/44/10a066e3650d19e10000000a114a6b/frameset.htm">Exception Handling in GP</a>
    For using Web Service as Callable Object, check this out! <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/44/4758351fcb1193e10000000a155369/frameset.htm">WS in GP</a>
    When specifying repeat, the action will be started again. If continue, the next action will be processed.
    Hope this helps,
    Best regards,
    David

  • Web Service String Array parameter

    I would like to pass a string array to a web service from
    mxml. I have passe strings successfully as individual parameters,
    but I am looking for some sample code (MXML) to define the string
    array paramter. When I try to specifiy <mx:Array> withing
    <mx:request>, I get a compile time error.
    Can anyone show how its done?
    Thanks in advance

    No Deserializer found to deserialize
    Re: No Deserializer found

  • Web service question? passing object - urgent

    hi there
    i have create a web service that takes a javabean as argument. the bean contains three strings. it is supported by the jax-rpc. when i try it, i keeping getting this error message:
    java.rmi.ServerException: Internal Server Error (deserialization error: unexpect
    ed XML reader state. expected: END but found: START: productDescription)
    at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.ja
    va:346)
    at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:221
    at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.j
    ava:54)
    at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:259)
    at c2.main(c2.java:67)
    i am using tomcat as the server. i followed the tutorial from sun. but it did not work. i was wondering if anyone o your experts can help me. thanks.

    The class files need to exist on the target machine. For example if I serialize MyClass and send it as a stream to machine B, machine B needs MyClass.class on the CLASSPATH to deserialize it.
    Also, make sure all machines working with the serialized stream have the same version of Java installed. (e.g., v1.2 does not play nice with v1.4, etc)

  • VB Web service with arrays as variant type - access from java

    Hi, I have a VB service as an activex.dll running on IIS. My first experience with VB.
    The input type is variant, as VB will only handle arrays of that type. All works well with
    a VB client. It takes 2 arrays in and returns an array. The WSDL file using a complex
    type of
    <complexType name='ArrayOfanyType'>
         <complexContent>
              <restriction base='SOAP-ENC:Array'>
                   <attribute ref='SOAP-ENC:arrayType' wsdl:arrayType='anyType[]'/>
              </restriction>
         </complexContent>
    </complexType>
    I take this WSDL file to the client side, change the type to
    <complexType name='ArrayOfinteger'>
         <complexContent>
              <restriction base='SOAP-ENC:Array'>
                   <attribute ref='SOAP-ENC:arrayType' wsdl:arrayType='integer[]'/>
              </restriction>
         </complexContent>
    </complexType>
    and then generate the Java proxy using jdeveloper 9031. All is good and I call the service
    and get a response, which in turn gives me a result. the result.getvalue fails with a caste
    exception, [LObject[] to Integer[]. The return value is there, but it's type is Object, which I can
    see by inspecting response in the debugger. I am getting
    pretty sure it is not a Java Object, but a dom or sax Object. The DOM DocumentBuilder
    works for String to get the values, but not for this Object type. Does anyone know how to
    parse out an Object Type with DOM or SAX?

    A java type "Object" is parent class of all java instances - to parse it with DOM or SAX requires you to cast it to the required object type by that parser api - eg "Document" - check out the DOM and SAX api docuemntation.

  • Problem in Web service while return ICollection object

    I developed a webservice, that need to be return a ICollection object.
    while am doing this it showing an error that.
    <b>You must implement a default accessor on System.Collections.ICollection because it inherits from ICollection.</b>
    can u help me in this context
    my code is like
    ICollection iCollectionObj;
    [WebMethod]
    public ICollection GetResourceTypes()
    DirSearchBO dirObj = new DirSearchBO();
    iCollectionObj = dirObj.GetResouceTypes() as ICollection;
    return iCollectionObj;
    above code dirObj.GetResouceTypes() method return a collection that i explicitly converting to ICollection object and retuning....

    Is your patching is still in progrees?If you are patching for basis components then you can expect dumps and they will not allow you to login to the system sometimes .In this case we can perform import from os level to get rid of the issue.
    If your patching is in progress then I would prefer you to wait till it completes.And if this is happening after patching I request you to post log file entries.
    Srikanth.

Maybe you are looking for

  • Can't pair apple remote to mbp

    I've been searching for a while now but all the solutions found did not fix the pairing issue I encounter between my Macbook Pro and the apple remote. I've a Apple TV and a Macbook Pro. Both I want to control with a apple remote. Now pairing should d

  • New 21.5 iMac

    I was wondering--- I just started up my new iMac--everything works great--but the icon for my hard drive does not show on the desktop--any ideas?? I did a restart and permissions repair but still no icon shows in it's usual right hand corner--Any hel

  • I bought my Mom an iSight- how can I video with her?

    Hey, I am still confused with some of the threads I've read. I just sent my mom an iSight and I want to video chat with her. Will an AIM account allow me to do this? How about the free trial .Mac account? The reason I am confused is I dont know if AI

  • How to invoke system editor by double click a file(windows)?

    how to invoke system editor by double click a file(windows)? Just like that, double click a file named a.doc, windows will open it by word.exe.

  • Can I delete the new maps in ios6?

    Can I delete this new disappointing maps app that doesn't work? Can I go back to the previous iOS?