Problem with attachment in web service

I'm writing a WebService under WebLogic 9.2 . My WebService API needs to recive and return an attachment. I'm tring to use a javax.activation.DataHandler object for the attachment, but for some reason in the WSDL file that being created, the DataHandler isn't being recognize and the "http://www.bea.com/servers/wls90/wsee/attachment" namespace is being associated with it (I'm using "jwsc" in the build.xml).
Does anyone encounter with problem ? and does the DataHandler is the right object to use for attachment (i want to avoid using base-64 String)?

duplicate problem with a secured web service

Similar Messages

  • Problem with accessing a web service from outside world

    Hello SAP experts
    I have a custom BAPI for which I have created a webservice.
    If I login as an admin to the BOX where I have installed this SAP server and open an internet explorer window and give the URL, I can access the web service without any problem. This is just a simple BAPI that searches for some data from a table based.
    However, when I give the same URL from a different PC, it can open the web service and in the fields if I give the data and click on send button, it fails with an error '500 Internal Server Error '.
    I looked for the details of this error on internet and it says that this is some general error and solutions that it suggested doesn't help my scenario.
    Has anyone seen this problem before? Any help will be highly appreciated.
    Tks
    Ram

    i have tried the stack trace in the catch but as i said on the statement where i made the object for the service the program just exits. it didn't return any exception or any output.
    thanx for refering me any answer.......

  • Problem with Deployments of web service Project as EAR in weblogic console

    Hi All :-)
    I was facing the problem with the Deployments of web service(java class) as EAR.I created the one web project associated with EAR project. After my development i exported this project as EAR and deployed the same on the weblogic console.....But time it will work fine and sometime it Deployments status will not become active (its running status) and failed after activate the changes.
    Can any body tell me the real problem with weblogic console for Deployments?
    Please tell me the solution...it?s urgent for me...If you know the answer please mail me on [email protected] or reply here on forum
    Thank you very much for your time.
    Rgds
    Ranjit

    I received the same message and resolved it by adding the following jars to the classpath. All these jars came from the weblogic92 directory:
    server/lib/ant/ant.jar
    common/lib/apache_xbean.jar
    server/lib/jsafe.jar
    server/lib/weblogic.jar
    server/lib/webservices.jar
    server/lib/webserviceclient.jar
    server/lib/webserviceclient+ssl.jar
    server/lib/schema/weblogic-container-binding.jar
    server/lib/xbean.jar
    hth,
    John

  • Xi sender mail adapter with attachment (to Web Service w/ attachment)

    Hello,
    We're working on an XI scenario wherein a sender mail adapter polls an exchange server inbox for mail (with attachment)and sends the attachment to a Web Service via SOAP Adapter? Does anyone know if this is doable, and if so, how?
    Thanks,
    Eric

    Hi!
    I think so, if you just have a single attachment to be transferred.
    Use the Mail Sender Adapter and specify the MailServer URL etc...
    In the Module provessor of the Mail-Adapter you have to specify the PayloadSwapBean ( -> this changes the payload - the attachment becomes the payload)
    then you configure the standard XI-scenario with
    SenderAgreement
    Mapping if necessary
    Receiver Agreement
    Receiver adapter
    kr Martin

  • Problem with java based Web Services in ADF-.

    I have developed a Web service based on the Java class generated through Business components. Steps are as below:-
    1)     Created a Read only View Object with EmpDeptViewObj name and has following query:-
    “select e.EMPLOYEE_ID,e.FIRST_NAME,e.LAST_NAME,e.EMAIL,e.JOB_ID, d.DEPARTMENT_ID,d.DEPARTMENT_NAME
    from HR.EMPLOYEES e,HR.DEPARTMENTS d where e.department_id=d.department_id
    and d.DEPARTMENT_NAME=:1”
    2)     Created an AM. Added the above created View Object in it and then added the following custom method it in:-
    public String[] getEmpDetailsAsString(String deptName)
    EmpDeptViewObjImpl empDeptVOObj=this.getEmpDeptViewObj1();
    empDeptVOObj.setWhereClauseParams(null);
    empDeptVOObj.setWhereClauseParam(0,deptName);
    empDeptVOObj.executeQuery();
    int fetchedRowCount = empDeptVOObj.getRowCount();
    EmpDeptViewObjRowImpl[] rows = new EmpDeptViewObjRowImpl[fetchedRowCount];
    String[] temp=new String[fetchedRowCount];
    RowSetIterator rowIter = empDeptVOObj.createRowSetIterator("rowIter");
    if (fetchedRowCount > 0)
    rowIter.setRangeStart(0);
    rowIter.setRangeSize(fetchedRowCount);
    for (int count = 0; count < fetchedRowCount; count++)
    rows[count]=(EmpDeptViewObjRowImpl)rowIter.getRowAtRangeIndex(count);
    temp[count]=rows[count].getFirstName();
    rowIter.closeRowSetIterator();
    return temp;
    public EmpDeptViewObjRowImpl[] getEmpDetailsAsRowImplObj(String deptName)
    EmpDeptViewObjRowImpl[] rows=null;
    if(deptName!=null)
    EmpDeptViewObjImpl empDeptVOObj=this.getEmpDeptViewObj1();
    empDeptVOObj.setWhereClauseParams(null);
    empDeptVOObj.setWhereClauseParam(0,deptName);
    empDeptVOObj.executeQuery();
    int fetchedRowCount = empDeptVOObj.getRowCount();
    rows = new EmpDeptViewObjRowImpl[fetchedRowCount];
    RowSetIterator rowIter = empDeptVOObj.createRowSetIterator("rowIter");
    if (fetchedRowCount > 0)
    rowIter.setRangeStart(0);
    rowIter.setRangeSize(fetchedRowCount);
    for (int count = 0; count < fetchedRowCount; count++)
    rows[count]=(EmpDeptViewObjRowImpl)rowIter.getRowAtRangeIndex(count);
    rowIter.closeRowSetIterator();
    return rows;
    public EmpDeptBean[] getEmpDetailsBasedOnBean(String deptName)
    EmpDeptViewObjImpl empDeptVOObj=this.getEmpDeptViewObj1();
    empDeptVOObj.setWhereClauseParams(null);
    empDeptVOObj.setWhereClauseParam(0,deptName);
    empDeptVOObj.executeQuery();
    int fetchedRowCount = empDeptVOObj.getRowCount();
    EmpDeptBean empDeptRow[]=new EmpDeptBean[fetchedRowCount];
    EmpDeptViewObjRowImpl[] rows = new EmpDeptViewObjRowImpl[fetchedRowCount];
    RowSetIterator rowIter = empDeptVOObj.createRowSetIterator("rowIter");
    if (fetchedRowCount > 0)
    rowIter.setRangeStart(0);
    rowIter.setRangeSize(fetchedRowCount);
    for (int count = 0; count < fetchedRowCount; count++)
    rows[count]=(EmpDeptViewObjRowImpl)rowIter.getRowAtRangeIndex(count);
    empDeptRow[count].setDEPARTMENTID(rows[count].getDepartmentId());
    empDeptRow[count].setDEPARTMENTNAME(rows[count].getDepartmentName());
    empDeptRow[count].setFIRSTNAME(rows[count].getFirstName());
    empDeptRow[count].setLASTNAME(rows[count].getLastName());
    empDeptRow[count].setJOBID(rows[count].getJobId());
    empDeptRow[count].setEMPLOYEEID(rows[count].getEmployeeId());
    empDeptRow[count].setEMAIL(rows[count].getEmail());
    rowIter.closeRowSetIterator();
    return empDeptRow;
    3)     And then generated the Web Service from Application module.
    Problem here is I am unable to return multiple columns to the xml generated. And only getEmpDetailsAsString and getEmpDetailsAsRowImplObj. And getEmpDetailsBasedOnBean method is not even getting published in end point.
    Please help me to solve this problem.
    Thanks in Advance
    ~Vikram
    Message was edited by:
    Vikram

    Could you please paste your WSDL?

  • Problems with using old web service project with new WLS/OEPE install

    I developed a java web service two years ago using WLS 10.3.3 and OEPE. After development I checked the workspace into Subversion including the .metadata directory. The web service was deployed to a production WLS box and is running fine.
    Now I have a new Windows 7 desktop computer. I have installed WLS 10.3.3 and OEPE on my new desktop and am trying to get the web service I wrote two years ago to run locally. When OEPE launches I point the workspace to the workspace project directory (from two yrs ago) that I have just checked out from Subversion. However when the OEPE IDE comes up I have many errors in the java code. Pretty much every java class is flagged with a "cannot be resolved to a type" error.
    Also, when I try to create a new server and domain, I have a problem there. I select "Oracle WebLogic Server 11gR1 PatchSet 2" as the server type, click Next on the wizard, but then on the next window where you select the Domain, the Domain Directory is disabled and will not let me enter a value, and the link to allow you to create a new Domian is not visible.
    Feeling kind of stupid as this should be really simple to do. Am I proceeding correctly by saving off the entire workspace and then trying to use that workspace in the new WLS/OEPE install? Any help would be greatly appreciated.

    Have you tried creating a new workspace, then import the project from your subversion workspace?

  • A problem with building a web service with netbeans

    always a problem occurs when i try to build a web service server side.
    build is perfect .but when i said run the project there is an error occurs:
    "Deployment error:null. See the server log file for details."
    error link goes me to this row in the build-impl.xml file of the project:
    <nbdeploy forceRedeploy="${forceRedeploy}" clientUrlPart="${client.urlPart}" debugmode="false"/>
    i am waiting for your help.

    Being a total novice on the https/SSL configuration side of things, I've finally managed to dig down to the fact that our external partner of course needs to have a certificate installed in order to run https.
    I guess the browser did not prompt and ask for acceptance of this, because it was already verified through one of the standard issuers - VeriSign.
    So was then able to export the certificate through IE's Properties>Certificate>Details>Copy To File...
    Will then try to import this into the correct domain on the WebLogic server.
    (A quick test of the web service from the EM console worked fine. Strange then that executing the service through a partner link in bpel does not work, but I guess it may have to do with a local bpel being exposed as a web service in itself, and that security on both sides is called for... maybe... :-) )
    -Haakon-

  • Problem with Live Office Web Services

    Hi@all,
    we have a problem with the Live Office connection options.
    The Webservice URL entry has an error: "Verion conflict: Your Live office client needs a newer version of Business Objects Web Services".
    I have installed the newest SP (SP3) for XI 3.1 for my Live Office Client and for the BO client tools but it do not work. Has anybody an idea?
    Thanks.
    Thomas

    Any solution for this? We have the same issue.
    Got resolved by recreating the webi document from scratch and the live connections.
    But this issue really scares me as I have did not see any reason for this to happen and it is very inconsistant.
    Anil

  • Problem with document/literal web services

    Hi,
    I need to publish a document\literal WSDL for a web service on my OC4J 10.1.2.2 because my app has an interface with a .NET system.
    I generated the WSDL with JDEV 10.1.3.3 and tried to deploy it on an OC4J 10.1.2 using JDEV 10.1.2.
    The deployment worked fine but when I'm trying to access the web service with the generated stub I'm getting the following message:
    "These methods do not conform to the restrictions imposed by the web service implementation"
    and then a list of these methods.
    Later I tried to remove the parameters from the methods and regenerated the WSDL and it worked fine, but I need the methods with the parameters.
    What can I do?
    Thanks

    Jason, have you made any progress with CF7 and WS Security?
    It doesn't seem like enough information on this is available. Is it
    even possible? and how?

  • Problem with 10.13 web services tutorial

    I have just tried to complete the following oracle tutorial Developing, Deploying and Managing Web Services Using JDeveloper and Oracle Application Server that is available here http://www.oracle.com/technology/obe/obe1013jdev/ws/wsandascontrol.htm.
    I have successfully completed the first 10 steps without any problems and the class compiles, but when I reach step 5 of the second section entitled Creating a Web Service on the Java Class I can not progress any further.
    Step 5 states:
    On the methods page of the wizard, select the check boxes next to both methods from teh available methods and click finish.I can not do this because both of the check boxes are greyed out and not active. The only thing I can select is the why not? button. Upon pressing this I get the following message The class datapackage.GetDates contains compilation errors which means the validity of the methods could not be determined .
    I can not understand why I am getting this message as I have followed the tutorial through up until this point exactly.
    I am using JDeveloper 10.1.3.0.4 (SU4) Build JDEVADF_10.1.3_NT_060125.0900.3673
    A colleague of mine has also tried to complete the tutorial and is having the same problem as me.
    I'd appreciate your thoughts and suggestions in fixing this problem.
    Thanks in advance
    David

    Hi Sunil,
    I am not experiencing any compilation errors - that is why I am confused.
    the class compiles without any problems as per the instructions
    Compiling...
    C:\JDev1013\jdk\jre\bin\java.exe -jar C:\JDev1013\jdev\lib\ojc.jar -noquiet -warn -nowarn:320 -nowarn:486 -nowarn:487 -deprecation:self -nowarn:560 -nowarn:704 -nowarn:489 -nowarn:415 -nowarn:909 -nowarn:412 -nowarn:414 -nowarn:561 -nowarn:376 -nowarn:371 -nowarn:558 -nowarn:375 -nowarn:413 -nowarn:377 -nowarn:372 -nowarn:557 -nowarn:556 -nowarn:559 -source 1.5 -target 1.5 -encoding Cp1252 -g -d C:\dev\java\1013\JavaWebService\GetDates\classes -make C:\dev\java\1013\JavaWebService\GetDates\classes\GetDates.cdi -classpath  C:\JDev1013\jdk\jre\lib\rt.jar;C:\JDev1013\jdk\jre\lib\i18n.jar;C:\JDev1013\jdk\jre\lib\sunrsasign.jar;C:\JDev1013\jdk\jre\lib\jsse.jar;C:\JDev1013\jdk\jre\lib\jce.jar;C:\JDev1013\jdk\jre\lib\charsets.jar;C:\JDev1013\jdk\jre\classes;C:\dev\java\1013\JavaWebService\GetDates\classes -sourcepath  C:\dev\java\1013\JavaWebService\GetDates\src;C:\JDev1013\jdk\src.zip C:\dev\java\1013\JavaWebService\GetDates\src\datespackage\GetDates.java
    [13:00:49] Successful compilation: 0 errors, 0 warnings.The problem I am getting is that tick boxes which the instructions state to tick in step 5 of the second section entitled creating a web service on the java class are greyed out and not active.
    Any ideas???
    Thanks
    David

  • UWL connector: problems with calling a web service with a SAPLOGONTICKET

    Hi,
    I want to implement a uwl connector that calls a web service to retrieve the uwl items data with a SAPLOGONTICKET. If I refresh the UWL I get the following error.
    An error occured while reading data from the destination sap.com/com.xxxx.connector.RequestLeaveDP/com.xxxx.connector.RequestLeave/Config1Port_Document. The error was: com.sap.security.core.client.ws.SSO2Exception No SAP Logon Ticket was found for the user. Please ensure the user authenticated using HTTP/HTTPS and the JAAS login stack has been configured correctly. As an alternative, consider changing the authentication type to Assertion Ticket. .
    If I call  the Web Service in an iView I don't get this error. Maybe the UWL calls the web service not with the current authenticated user.
    I tried the following code, to get the current SSO2 Ticket from the current user. It looks like, that is the current user, but the web service will not accept this. (testing purpose)
    com.sap.security.api.IUser currentUser = com.sap.security.api.UMFactory.getAuthenticator().getLoggedInUser();
    String logonTicketUwlUser = (String) context.getUser().getTransientAttribute("com.sap.security.core.usermanagement", "MYSAPSSO2_STRING");
    String logonTicketCurrentUser = (String) currentUser.getTransientAttribute("com.sap.security.core.usermanagement", "MYSAPSSO2_STRING");
    InitialContext contextWebService = new InitialContext();
    RequestLeaveWebService requestLeaveWebService = (RequestLeaveWebService) contextWebService.lookup(wsClient);
    RequestLeaveWebServiceViDocument webServiceEndPoint = requestLeaveWebService.getLogicalPort("Config1Port_Document");
    UWLHolidayItem holidayItem = webServiceEndPoint.getHolidayItem("");
    Any ideas?
    Regards
    Markus
    Edited by: Markus Karsch on Oct 18, 2008 11:15 PM

    Are you calling invoke()?
    Do you have the port type in the servlet context?

  • Business Connector problem with SSL and Web Services

    Hi,
    I have generated a Web Connector Service and tested this in our DEV and QA environment with http and no credentials.
    All is fine.
    I now switched to SSL and was provided with an https WSDL by our Web Server developers. The Web Connector service generates fine however as soon as I execute the service I get a NumberFormatException. Exact error is:
    java.io.IOException:java.lang.NumberFormatException: null
    The error occurs in pub.client:http
    I traced through the working (in QA) and non-workinfg versions and checked the pipeline prior to the call and can see no different apart from the difference in protocol.
    Does anyone have any idea what the cause is? I cannot determine what value is null.
    Thanks
    Brian

    Hi,
    I have generated a Web Connector Service and tested this in our DEV and QA environment with http and no credentials.
    All is fine.
    I now switched to SSL and was provided with an https WSDL by our Web Server developers. The Web Connector service generates fine however as soon as I execute the service I get a NumberFormatException. Exact error is:
    java.io.IOException:java.lang.NumberFormatException: null
    The error occurs in pub.client:http
    I traced through the working (in QA) and non-workinfg versions and checked the pipeline prior to the call and can see no different apart from the difference in protocol.
    Does anyone have any idea what the cause is? I cannot determine what value is null.
    Thanks
    Brian

  • Issue with creation of web service

    hello,
    i use Jdeveloper 11.1.2.0.0 and i want to create a new Web service client and proxy to communicate with Bi publisher web services.
    1) I Choose the client style JAX-WS Style
    2) in the select Web services Description i set WSDL document URL to
    http://dev2008:7001/xmlpserver/services/v2/SecurityService?wsdl
    I let the steps 3 to 8 as default.
    at the step 9
    When i click on Finish
    i have the error
    java.lang.IllegalArgumentException: Not a valid simple name: 'v2/SecurityServiceClient'
         at oracle.javatools.parser.java.v2.internal.symbol.SymFactory.throwIllegalArgumentException(SymFactory.java:228)
         at oracle.javatools.parser.java.v2.internal.symbol.SymFactory.createSimpleNameSym(SymFactory.java:215)
         at oracle.javatools.parser.java.v2.internal.symbol.SymFactory.createClass(SymFactory.java:713)
         at oracle.jdevimpl.webservices.tools.weblogic.generator.SampleClientGenerator.generateClassDeclaration(SampleClientGenerator.java:247)
         at oracle.jdevimpl.webservices.tools.weblogic.generator.SampleClientGenerator.generateClientForPort(SampleClientGenerator.java:179)
         at oracle.jdevimpl.webservices.tools.weblogic.generator.SampleClientGenerator.generateForService(SampleClientGenerator.java:124)
         at oracle.jdevimpl.webservices.tools.weblogic.generator.SampleClientGenerator.generate(SampleClientGenerator.java:91)
         at oracle.jdevimpl.webservices.tools.weblogic.JDevWsimportTool.generateSampleClientCode(JDevWsimportTool.java:1264)
         at oracle.jdevimpl.webservices.tools.weblogic.JDevWsimportTool.generateCode(JDevWsimportTool.java:620)
         at oracle.jdevimpl.webservices.tools.weblogic.JDevWsimportTool.generateCode(JDevWsimportTool.java:443)
         at oracle.jdevimpl.webservices.tools.weblogic.WebLogicAdaptor.wsimportGenerateCode(WebLogicAdaptor.java:1020)
         at oracle.jdevimpl.webservices.tools.weblogic.WebLogicAdaptor.createProxy(WebLogicAdaptor.java:284)
         at oracle.jdeveloper.webservices.tools.WebServiceTools.createProxy(WebServiceTools.java:271)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at oracle.jdeveloper.webservices.tools.WebServiceTools$1.invoke(WebServiceTools.java:132)
         at $Proxy47.createProxy(Unknown Source)
         at oracle.jdeveloper.webservices.model.proxy.generator.CreateProxy.createJaxWsProxy(CreateProxy.java:1194)
         at oracle.jdeveloper.webservices.model.proxy.generator.CreateProxy.doGeneration(CreateProxy.java:382)
         at oracle.jdeveloper.webservices.model.proxy.generator.CreateProxy.action(CreateProxy.java:174)
         at oracle.jdeveloper.webservices.model.generator.GeneratorAction.run(GeneratorAction.java:142)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
         at java.lang.Thread.run(Thread.java:662)
    best regards
    Jean marc

    hi,
    no it's too large.
    i think i have solved my problem,
    originally the name of the web service is setting on v2/SecurityService_
    </wsdl:binding>
    <wsdl:service name="SecurityService">
    <wsdl:port binding="impl:SecurityServiceSoapBinding" name="v2/SecurityService">
    <wsdlsoap:address location="http://dev2008:7001/xmlpserver/services/v2/SecurityService"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    if i change the name to SecurityService as follow , no error occurs
    </wsdl:binding>
    <wsdl:service name="SecurityService">
    <wsdl:port binding="impl:SecurityServiceSoapBinding" name="SecurityService">
    <wsdlsoap:address location="http://dev2008:7001/xmlpserver/services/v2/SecurityService"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>

  • Attachment Based Web Services

    Where do I get More details about Attachment based web services with netbeans 5.5.
    Any Links for,
    Any Technical Articls,
    Example Source code Downloads?

    Where do I get More details about Attachment based web services with netbeans 5.5.
    Any Links for,
    Any Technical Articls,
    Example Source code Downloads?

  • Handle Session data with JAX-WS web services

    Is it posible to to handle session tracking with JAX-WS web services without implementing my own session logic.
    If posible how do we put values in to session and get them back.
    And also assuming that sessions are supported is it posible to share the same session between two web services on the same web application.

    Hello!
    Do you have any solution to your problem now? I also need to maintain a session bean between 2 webservices. If you solved this, can you please tell me how?
    Thanks a lot!

Maybe you are looking for