JAXWS 2.0 annotation MTOM  policy ignored in JDeveloper 10g

Hi all,
I'm trying to generate a JAXWS 2.0 webservice with annotations in JDeveloper 10g, but the @MTOM policy is being ignored and the service does not generate an attachment.
This is my code:
package es.pruebaws.negocio;
import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.xml.ws.soap.MTOM;
@Stateless
@WebService(name="PruebaWS")
@MTOM
public class PruebaServiceImpl implements PruebaService {
public PruebaServiceImpl() {
@WebMethod
public byte[] getSaludoMTOM(){
return "Hola caracola".getBytes();
The WSDL fragment generated is:
<element name="getSaludoMTOMResponse" type="tns:getSaludoMTOMResponse"/>
<complexType name="getSaludoMTOMResponse">
<sequence>
<element name="return" type="base64Binary" nillable="true"/>
</sequence>
</complexType>
I included the webservices.jar from JDK 6.0 - 13 to provide JAXWS to the project.
What I am missing? Is the generator included in JDeveloper 10g capable to generate the WSDL with JAXWS 2.0 annotation policies?
Thanks in advance.

repost

Similar Messages

  • Pop up warning when creating policy domain in OAM 10g

    Has anyone seen below pop up warning when creating a policy domain in OAM 10g Policy manager?
    Warning:
    This policy domain controls the access to the URI you are currently accessing
    /access/oblix/apps/policyservcenter/bin/policyservcenter.cgi
    Are you sure you want to commit these changes?

    Hi,
    Does Note 842378.1 look like a match for you? Maybe the obcompounddata attribute is missing for some odd reason.
    Regards,
    Colin

  • JUnit 4 AfterClass annotation alternative in JUnit 3 in JDeveloper 10g

    hi
    A JUnit 4.6 test class like this ...
    public class MyJUnit4TestClass
         @BeforeClass public static void myBeforeClassMethod()
         { System.out.println("MyJUnit4TestClass.myBeforeClassMethod() : begin"); }
         @AfterClass public static void myAfterClassMethod()
         { System.out.println("MyJUnit4TestClass.myAfterClassMethod() : begin"); }
         @Before public void myBeforeMethod()
         { System.out.println("MyJUnit4TestClass.myBeforeMethod() : begin"); }
         @After public void myAfterMethod()
         { System.out.println("MyJUnit4TestClass.myAfterMethod() : begin"); }
         @Test public void myFirstTest()
         { System.out.println("MyJUnit4TestClass.myFirstTest() : begin"); }
         @Test public void mySecondTest()
         { System.out.println("MyJUnit4TestClass.mySecondTest() : begin"); }
         public static void main(String[] pArguments)
              org.junit.runner.JUnitCore.main("junitafterclassstuff.junit4stuff.MyJUnit4TestClass");
    } ... results in output like this ...
    JUnit version 4.6
    MyJUnit4TestClass.myBeforeClassMethod() : begin
    .MyJUnit4TestClass.myBeforeMethod() : begin
    MyJUnit4TestClass.mySecondTest() : begin
    MyJUnit4TestClass.myAfterMethod() : begin
    .MyJUnit4TestClass.myBeforeMethod() : begin
    MyJUnit4TestClass.myFirstTest() : begin
    MyJUnit4TestClass.myAfterMethod() : begin
    MyJUnit4TestClass.myAfterClassMethod() : begin
    Time: 0
    OK (2 tests)Given that JDeveloper 10g (10.1.3.4.0) does not support JUnit 4 (see threads Mature testing: TestNG or JUnit 4 for JDeveloper? and JUnit4 and Jdev 10.1.3.1), I am trying to find an alternative for the JUnit 4 AfterClass annotation in the JUnit version that is integrated (which seems to be 3.8.1).
    I could write code like this ...
    public class MyJUnit3TestClass extends TestCase
         protected static boolean fBeforeClassHasRun = false;
         protected static void myBeforeClassMethod()
              System.out.println("MyJUnit3TestClass.myBeforeClassMethod() : begin");
              fBeforeClassHasRun = true;
          * under which conditions or with which JUnit API hook can I call
          * this method, similar to the JUnit 4 AfterClass annotation
         protected static void myAfterClassMethod()
         { System.out.println("MyJUnit3TestClass.myAfterClassMethod() : begin"); }
         protected void setUp() throws Exception
              super.setUp();
              if (!fBeforeClassHasRun)
                   myBeforeClassMethod();
              System.out.println("MyJUnit3TestClass.setUp() : setting up");
         protected void tearDown() throws Exception
              super.tearDown();
              System.out.println("MyJUnit3TestClass.tearDown() : tearing down");
         public void testMyFirstTest()
         { System.out.println("MyJUnit3TestClass.testMyFirstTest() : begin"); }
         public void testMySecondTest()
         { System.out.println("MyJUnit3TestClass.testMySecondTest() : begin"); }
    } ... resulting in output like this ...
    MyJUnit3TestClass.myBeforeClassMethod() : begin
    MyJUnit3TestClass.setUp() : setting up
    MyJUnit3TestClass.testMySecondTest() : begin
    MyJUnit3TestClass.tearDown() : tearing down
    MyJUnit3TestClass.setUp() : setting up
    MyJUnit3TestClass.testMyFirstTest() : begin
    MyJUnit3TestClass.tearDown() : tearing downBut what can I do to call MyJUnit3TestClass.myAfterClassMethod() after all the tests in the class have been run, and as such let it behave similar to what the JUnit 4 AfterClass annotation allows me to do?
    many thanks
    Jan Vervecken

    repost

  • Orion-ejb-jar ignored by JDeveloper deploying to OC4J

    orion-ejb-jar.xml is ignored by JDeveloper 903 when deploying to external OC4J 903. Specific mappings like those below are lost:
    <entity-deployment name="RequestEJB" copy-by-value="false" data-source="jdbc/OracleDS" exclusive-write-access="false" table="REQUEST">
    <primkey-mapping>
    <cmp-field-mapping name="requestid" persistence-name="REQUESTID" persistence-type="NUMBER(9)"/>
    </primkey-mapping>
    <cmp-field-mapping name="requestid" persistence-name="REQUESTID" persistence-type="NUMBER(9)"/>
    <cmp-field-mapping name="requestuser" persistence-name="REQUESTUSER" persistence-type="VARCHAR2(30)"/>
    <cmp-field-mapping name="requestlabel" persistence-name="REQUESTLABEL" persistence-type="VARCHAR2(12)"/>
    <cmp-field-mapping name="requestdate" persistence-name="REQUESTDATE" persistence-type="DATE"/>
    <cmp-field-mapping name="isurgent" persistence-name="ISURGENT" persistence-type="VARCHAR2(1)"/>
    </entity-deployment>
    Instead, JDeveloper creates a new orion-ejb-jar.xml with different table name:
              <entity-deployment name="RequestEJB" location="RequestEJB" local-wrapper="RequestHome_EntityHomeWrapper421" table="RequestEJB_modulab_Proj_n76ccv" data-source="jdbc/OracleDS" exclusive-write-access="false" locking-mode="optimistic" update-changed-fields-only="true" delay-updates-until-commit="true" min-instances-per-pk="0" max-instances-per-pk="50" disable-wrapper-cache="true">
                   <primkey-mapping>
                        <cmp-field-mapping name="requestid" persistence-name="requestid" />
                   </primkey-mapping>
                   <cmp-field-mapping name="requestuser" persistence-name="requestuser" />
                   <cmp-field-mapping name="requestlabel" persistence-name="requestlabel" />
                   <cmp-field-mapping name="requestdate" persistence-name="requestdate" />
                   <cmp-field-mapping name="isurgent" persistence-name="isurgent" />
                   <finder-method query="">
                        <!-- Generated SQL: "select RequestEJB_modulab_Proj_n76ccv.requestid from RequestEJB_modulab_Proj_n76ccv -->
                        <method>
                             <ejb-name>RequestEJB</ejb-name>
                             <method-name>findAll</method-name>
                             <method-params>
                             </method-params>
                        </method>
                   </finder-method>
              </entity-deployment>
    orion-ejb-jar is placed at the META-INF folder. Why does JDeveloper ignore it? It does not ignore orion-application.xml nor orion-web.xml. Must I configure project or deployment profiles not to overwrite orion-ejb-jar?

    I believe that it is not JDeveloper issue but OC4J one. It does not pick up new orion-ejb-jar.xml if you re-deploy bean(s). It should deploy your orion-ejb-jar.xml when you're deploying yor application for the first time (so there is not orion-ejb-jar.xml in deployments directory). If you want OC4J to pick changes up remove orion-ejb-jar.xml from $OC4J_HOME/application-deployments/<application>/<Bean>.jar/ and then deploy it either manually or with JDeveloper. I hope it will help.

  • Java.policy ignored

    I'm profiling an applet during the code/compile cycle, and I don't want to sign it every time, so I've modified my java.policy file.
    I've tried many different settings in my java.policy file and they seem to always be ignored. Finally I tried the following "catch all"
    grant codeBase "file:/-" {
         permission java.security.AllPermission;
    and my applet still gets an AccessControlException.
    WTF?
    Doesn't that line mean that anything on my hard drive can do whatever it wants?
    My applet is not being served on a webserver, my profiler runs it with javaw ... sun.applet.AppletViewer file:/.../page.html.
    I'm using 1.4.1_01.

    This is far fetched, but it couldn't be that somehow the
    Appletviewer class doesn't install a security manager, could it?At least on 1.4.1_01, it does, and I would assume it always has. You could check by calling System.getSecurityManager() (q.v.), or by running this simple applet:
    public class Appy extends Applet {
        String name = "none";
        public void start() {
            SecurityManager sm = System.getSecurityManager();
            if (sm != null) name = sm.getClass().getName();
        public void paint(Graphics g) {
            FontMetrics fm = getFontMetrics(getFont());
            int x = (getSize().width - fm.stringWidth(name)) / 2;
            int y = (getSize().height - fm.getHeight()) / 2;
            g.drawString(name, x, y + fm.getAscent());
    }On my system (JDK 1.4.1_01, Win XP) it diplays: sun.applet.AppletSecurity
    Good luck,
    David R. Conrad

  • Windows 2003 Password Policy Ignored in Default Domain Policy

    Hi there I've a problem on my DC.
    i set in the "default domain policy" the settings form the policy password lenght complexity etc etc..
    When i RUN Group policy modelling simulation i cannot view the settings of Windows Settings\Security Settings\account policy\password policy
    the scope of the GPO is Authenticated
    the GPO seems to be ignored for the security settings but not for the other parameters like kerberos security.
    Any Idea to solve this issue?

    Hi Federico,
    >>i cannot view the settings of Windows Settings\Security Settings\account policy\password policy
    What do this mean? Does this mean that we can’t see the password policy in the modeling, or that we can’t see the change we made to the password policy? Besides, were there
    error messages displayed in the modeling?
    In addition, we can try running the Group Policy Modeling Wizard again to see if the issue persist.
    Best regards,
    Frank Shen

  • Exchange 2013 CU6 with DAG - ECP Delete does not go to soft-delete state, retention policy ignored

    I am not sure if this is a BUG or this is as intended.  Typically if a mailbox is 'deleted' from the EAC or ECP console the user account is disabled and the mailbox is marked for removal (soft-delete) until the retention policy expires the item (default
    30 days). However we deleted a mailbox and the mailbox was purged immediately as well as the user was moved to the hidden recycle bin in Active Directory.
    We replicated this issue twice in a DAG environment, we do not have this issue in a non-DAG environment.
    Question:  Other than restoring from the backup, is there a way to recover the mailbox?
    Thank You,
    -Jake
    Jacob Evans Jake of All Trades

    Hi,
    I tested in my lab, Exchange 2013 CU1 with DAG deployed, if I deleted a mailbox from EAC, then it would be a disconnected mailbox and the associated Active Directory user account was also deleted. I could find it under the Disconnected Mailbox.
    Was the mailbox logged ever?
    If you delete a mailbox that you never log in, it won't show as disconnected mailbox.
    And for the question :"Question:  Other than restoring from the backup, is there a way to recover the mailbox?", I'm afraid you have to recover from backup.
    Best regards,
    Belinda Ma
    TechNet Community Support

  • How to ignore JSP errors in JDeveloper 10g IDE?

    How do I ignore errors in JSPs? I forgot it is in server.xml or some other xml configuration file.

    Thanks for your reply. there is 'deprecation warnings' under Project Properties--> Compiler. These errors are not deprecation errors.
    The below code doesn't help either.
    <jsp-config>
    <jsp-property-group>
    <url-pattern>*.jsp</url-pattern>
    <el-ignored>false</el-ignored>
    </jsp-property-group>
    </jsp-config>

  • Can we make apply  join a column on which VPD policy applied in Oracle 10g

    Hi,
    i am planning to apply a column level security using VPD concept into Oracle 10g
    but i have a one doubt.
    Suppose i am going to apply a VPD policy based on user priviliges on a column DEPTNO in EMP table so whenever a particular user logs in,he will not see the deptno.But he can fetch the data from other table DEPT based on join condition EMP.DEPTNO=DEPT.DEPTNO . Is it possible can we make a join a column on which VPD polciy is applied ?
    pls any idea or thought would be appreciable..
    Thanks in advance
    Anwar

    Hi Anwar!
    I have not tried yet, but I believe that you can do this.
    However imagine the following:
    A user U1 has the right to see some values in the deptno column, but not all. This is fine, and I believe that this is what you want to achieve.
    A user U2 will see no records from the deptno column. This will impact your query, as your emp.deptno = dept.deptno part of the where clause will deliever no records.
    So you have to be careful if this condition could apply and what the impact will be on your software.
    cu
    Andreas

  • "IPCSendMsg: could not initiate send" ,UDUMP trace can be ignored??(10g)

    Hi, all.
    The database is 2 node RAC database (10.2.0.2.0)
    on 32-bit windows 2003 EE SP1.
    I found "KJC: Wait for msg sends to complete" wait event in
    "Top 5 Timed Event" Section from AWR report.
    What is "KJC: Wait for msg sends to complete" wait event??
    The following is from UDUMP. I am not sure that "KJC : Wait .." has
    something to do with the following udump trace file.
    There is no error message in both alert log files and
    there is no bdump trace file.
    Currently, the database seems to be normal.
    Dump file d:\oracle\product\10.2.0\admin\rac\udump\rac2_ora_5656.trc
    Mon Sep 24 00:04:40 2007
    ORACLE V10.2.0.2.0 - Production vsnsta=0
    vsnsql=14 vsnxtr=3
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Real Application Clusters, OLAP and Data Mining options
    Windows Server 2003 Version V5.2 Service Pack 1
    CPU : 4 - type 586, 2 Physical Cores
    Process Affinity : 0x00000000
    Memory (Avail/Total): Ph:5278M/8190M, Ph+PgF:6596M/10041M, VA:316M/2047M
    Instance name: rac2
    Redo thread mounted by this instance: 2
    Oracle process number: 64
    Windows thread id: 5656, image: ORACLE.EXE (SHAD)
    *** 2007-09-24 00:04:40.156
    *** ACTION NAME:() 2007-09-24 00:04:40.156
    *** MODULE NAME:(OEM.SystemPool) 2007-09-24 00:04:40.156
    *** SERVICE NAME:(RAC.world) 2007-09-24 00:04:40.156
    *** CLIENT ID:() 2007-09-24 00:04:40.156
    *** SESSION ID:(486.53) 2007-09-24 00:04:40.156
    IPCSendMsg: could not initiate send on conn 0x5b0d3e98 to node [rac1 : 696 : 3996 : 359937], err 10054
    IPCGetRequestInfo: failed a request rqh(0x5b060db8), type(6), status(2), bytes(0)
    Any help will be greatly appriciated.
    Thanks and Regards.
    Message was edited by:
    user507290

    Dear Chris.
    Thanks for your reply.
    Does "KJC: Wait for msg sends to complete" wait event
    have something to do with the following udump trace file?
    I do not know how to respond the following message in UDUMP.
    There is no bdump trace file and there is no message in alert log files.
    The following message in udump can be ignored??
    Or, shoud I take an action??
    -->IPCSendMsg: could not initiate send on conn 0x5b0d3e98 to node [rac1 : 696 : 3996 : 359937], err 10054
    --> IPCGetRequestInfo: failed a request rqh(0x5b060db8), type(6), status(2), bytes(0)
    Thanks and Regards.
    Dump file d:\oracle\product\10.2.0\admin\rac\udump\rac2_ora_5656.trc
    Mon Sep 24 00:04:40 2007
    ORACLE V10.2.0.2.0 - Production vsnsta=0
    vsnsql=14 vsnxtr=3
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Real Application Clusters, OLAP and Data Mining options
    Windows Server 2003 Version V5.2 Service Pack 1
    CPU : 4 - type 586, 2 Physical Cores
    Process Affinity : 0x00000000
    Memory (Avail/Total): Ph:5278M/8190M, Ph+PgF:6596M/10041M, VA:316M/2047M
    Instance name: rac2
    Redo thread mounted by this instance: 2
    Oracle process number: 64
    Windows thread id: 5656, image: ORACLE.EXE (SHAD)
    *** 2007-09-24 00:04:40.156
    *** ACTION NAME:() 2007-09-24 00:04:40.156
    *** MODULE NAME:(OEM.SystemPool) 2007-09-24 00:04:40.156
    *** SERVICE NAME:(RAC.world) 2007-09-24 00:04:40.156
    *** CLIENT ID:() 2007-09-24 00:04:40.156
    *** SESSION ID:(486.53) 2007-09-24 00:04:40.156
    IPCSendMsg: could not initiate send on conn 0x5b0d3e98 to node [rac1 : 696 : 3996 : 359937], err 10054
    IPCGetRequestInfo: failed a request rqh(0x5b060db8), type(6), status(2), bytes(0)
    ------------------------------------------------

  • Optional MTOM as by MTOM Serialization Policy

    Hello All,
    I can't seem to find how to implement a jax-ws web service that allows both optimized and non-optimized messages as stated in
    MTOM Serialization Policy (http://www.w3.org/TR/2007/WD-soap12-mtom-policy-20070918/). Is it implied that when jax-ws is used all operations (or none) have to be send optimized? Is the optional function being implemented in a future version?
    Other tooling allows the optional function so that there is no need to implement services with exclusive mtom messages (unless you are okay with sending mtom messages for just plain content).
    Kind regards,
    Erwin

    Do you mean for the privacy policy link? What URL did you use? Apple will reject applications if they can find an URL that will take the user to a site that can be used to purchase items. You need to make sure you provide an URL that doesn't have a way to navigate to other areas of your website that allow purchasing.
    Neil

  • Problem using WS-Policy on JAX-WS service on WL... result: stacktrace

    I'm facing an issue with securing some JAX-WS webservices on weblogic 10.3.0.
    The webservices are created in Workshop using the top down approach (generate java from WSDL using wsdlc). No security policy annotations are used in code!
    When the service is deployed, it functions correctly. When a security policy (in this case policy:Wssp1.2-2007-Https-UsernameToken-Plain.xml) is attached via WL console, I need to activate changes and restart the webservice. So far so good.
    However the WSDL is not changed after adding the policy (as it does in Aqualogic). No additional information is included concerning security requirements.
    When I test the service from the weblogic test client or SoapUI, I get the following stacktrace:
    ]] Root cause of ServletException.
    java.lang.AssertionError: the tube must call the add(...) method to register itself before start copying other pipes, but weblogic.wsee.jaxws.framework.jaxrpc.TubeFactory$ServerJAXRPCTube@10a226e hasn't done so
         at com.sun.xml.ws.api.pipe.TubeCloner.copy(TubeCloner.java:104)
         at com.sun.xml.ws.api.pipe.helper.AbstractFilterTubeImpl.<init>(AbstractFilterTubeImpl.java:65)
         at com.sun.xml.ws.protocol.soap.MUTube.<init>(MUTube.java:93)
         at com.sun.xml.ws.protocol.soap.ServerMUTube.<init>(ServerMUTube.java:68)
         at com.sun.xml.ws.protocol.soap.ServerMUTube.copy(ServerMUTube.java:92)
         at com.sun.xml.ws.protocol.soap.ServerMUTube.copy(ServerMUTube.java:52)
         at weblogic.wsee.jaxws.framework.jaxrpc.TubeFactory$JAXRPCTube.copy(TubeFactory.java:235)
         at weblogic.wsee.jaxws.framework.jaxrpc.TubeFactory$JAXRPCTube.copy(TubeFactory.java:88)
         at weblogic.wsee.jaxws.framework.jaxrpc.TubeFactory$JAXRPCTube.copy(TubeFactory.java:235)
         at weblogic.wsee.jaxws.framework.jaxrpc.TubeFactory$JAXRPCTube.copy(TubeFactory.java:88)
         at com.sun.xml.ws.api.pipe.TubeCloner.copy(TubeCloner.java:102)
         at weblogic.wsee.jaxws.tubeline.FlowControlTube.<init>(FlowControlTube.java:26)
         at weblogic.wsee.jaxws.tubeline.FlowControlTube.copy(FlowControlTube.java:45)
         at weblogic.wsee.jaxws.tubeline.FlowControlTube.copy(FlowControlTube.java:9)
         at com.sun.xml.ws.api.pipe.TubeCloner.copy(TubeCloner.java:102)
         at com.sun.xml.ws.api.pipe.TubeCloner.clone(TubeCloner.java:74)
         at com.sun.xml.ws.server.WSEndpointImpl$2.<init>(WSEndpointImpl.java:231)
         at com.sun.xml.ws.server.WSEndpointImpl.createPipeHead(WSEndpointImpl.java:230)
         at com.sun.xml.ws.api.server.Adapter$Toolkit.<init>(Adapter.java:103)
         at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.<init>(HttpAdapter.java:427)
         at com.sun.xml.ws.transport.http.HttpAdapter.createToolkit(HttpAdapter.java:197)
         at com.sun.xml.ws.transport.http.HttpAdapter.createToolkit(HttpAdapter.java:93)
         at com.sun.xml.ws.api.server.Adapter$1.create(Adapter.java:112)
         at com.sun.xml.ws.api.server.Adapter$1.create(Adapter.java:110)
         at com.sun.xml.ws.util.Pool.take(Pool.java:75)
         at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:242)
         at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:134)
         at weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:272)
         at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:185)
         at weblogic.wsee.jaxws.JAXWSServlet.doPost(JAXWSServlet.java:180)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at weblogic.wsee.jaxws.JAXWSServlet.service(JAXWSServlet.java:64)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3498)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    >
    First that came in to mind was the keystore/SSL configuration in Weblogic. This however functions correctly as I've also used the keystore/SSL config for the Aqualogic (deployed on same
    WL instance) security configuration.
    Can anyone help me out?
    Edited by: Chris Everett NL on Jan 18, 2010 1:45 PM

    Hi Chris,
    I tried the WebService (*JAXWS*) on WLS10.3 with Policy "*policy:Wssp1.2-2007-Https-UsernameToken-Plain.xml*"...it worked for me ...Right now i am not sure exactly why it is giving exception to you...I tried with SOAP-UI as well ...but it is working fine...Please have a look on the following sample...
    http://jaysensharma.wordpress.com/2010/01/19/jaxws-with-wssp1-2-2007-https-usernametoken-plain-xml-policy/
    I am not sure that the sample will be useful for you or not...(if you want then i can even E-Mail you the complete testcase...if you can provide me your E-Mail Address).
    Even i can see that the Policy is added in the WSDL ...
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.3-07/10/2008 08:41 PM(bt). -->
    <!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.3-07/10/2008 08:41 PM(bt). -->
    <definitions xmlns:ns1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ws/Bank/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://ws/Bank/" name="Bank">
    <wsp:UsingPolicy ns1:Required="true"/>
    <wsp:Policy ns1:Id="Wssp1.2-2007-Https-UsernameToken-Plain.xml">
    <ns2:TransportBinding xmlns:ns2="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
    <wsp:Policy>
    <ns2:TransportToken>
    <wsp:Policy>
    <ns2:HttpsToken/>
    </wsp:Policy>
    </ns2:TransportToken>
    <ns2:AlgorithmSuite>
    <wsp:Policy>
    <ns2:Basic256/>
    </wsp:Policy>
    </ns2:AlgorithmSuite>
    <ns2:Layout>
    <wsp:Policy>
    <ns2:Lax/>
    </wsp:Policy>
    </ns2:Layout>
    <ns2:IncludeTimestamp/>
    </wsp:Policy>
    </ns2:TransportBinding>
    <ns3:SupportingTokens xmlns:ns3="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
    <wsp:Policy>
    <ns3:UsernameToken ns3:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
    <wsp:Policy>
    <ns3:WssUsernameToken10/>
    </wsp:Policy>
    </ns3:UsernameToken>
    </wsp:Policy>
    </ns3:SupportingTokens>
    </wsp:Policy>
    <types>
    <xsd:schema>
    <xsd:import namespace="http://ws/Bank/" schemaLocation="https://localhost:7002/Bank_BankSOAPImpl/Bank?xsd=1"/>
    </xsd:schema>
    </types>
    <message name="getBalance">
    <part name="parameters" element="tns:getBalance"/>
    </message>
    <message name="getBalanceResponse">
    <part name="parameters" element="tns:getBalanceResponse"/>
    </message>
    <portType name="Bank_BankSOAPImpl" wsp:PolicyURIs="#Wssp1.2-2007-Https-UsernameToken-Plain.xml">
    <operation name="getBalance">
    <input message="tns:getBalance"/>
    <output message="tns:getBalanceResponse"/>
    </operation>
    </portType>
    <binding name="BankSOAPBinding" type="tns:Bank_BankSOAPImpl">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <operation name="getBalance">
    <soap:operation soapAction=""/>
    <input>
    <soap:body use="literal"/>
    </input>
    <output>
    <soap:body use="literal"/>
    </output>
    </operation>
    </binding>
    <service name="Bank">
    <port name="BankSOAP" binding="tns:BankSOAPBinding">
    <soap:address location="https://localhost:7002/Bank_BankSOAPImpl/Bank"/>
    </port>
    </service>
    </definitions>
    Thanks
    Jay SenSharma
    Edited by: Jay SenSharma on Jan 19, 2010 11:42 PM

  • Expose ejb3 as jaxws web service

    Dear,
    I want to expose my ejb3 stateless sessionbean as a jaxws web service (in order to have versioning for production redeployment high availability). I followed these docs a bit: http://e-docs.bea.com/wls/docs92/webserv/jws.html
    excerpt of my class :
    @Session(ejbName="myWSBean")
    @MethodIsolationLevelPattern(pattern="*", isolationLevel=IsolationLevel.TRANSACTION_READ_COMMITTED)
    @JndiName(remote="...")
    @RoleMapping(principals="MYUSER", roleName="MYUSER")
    @TransactionAttribute(value=TransactionAttributeType.REQUIRED)
    @Stateless
    @WebService(name="MyServicePort", serviceName="MyService",
    targetNamespace="http://.../.../MyInterfaceService")
    public class MyWSBean implements SessionBean{
    When I try to build the web service with the jws ant task, I get following errors:
    [jwsc] [ERROR] - The annotation weblogic.ejbgen.RoleMapping is not allowed on ...MyWSBean because it is a JAX-WS type web service.
    [jwsc] [ERROR] - The annotation weblogic.ejbgen.Session is not allowed on ...MyWSBean because it is a JAX-WS type web service.
    Seems its not allowed to mix jaxws and ejb3 annotations. What is the way to go to expose my ejb3 bean as a resource?
    thx

    Thx for your reply.
    I did it differently: Creating a EJB3 bean (using the weblogic.ejbgen annotations) and afterwords creating a seperate file for the JAXWS webservice and there injecting the bean via the EJB annotation. Works smoothly.
    Although I would rather use 1 file for both sessionbean and web service
    Therefore, like I said, in the EJB3 sessionbean I now use following ejbgen annotations:
    @Session(ejbName="...",
                   runAs="...", runAsIdentityPrincipal="...",
                   createAsPrincipalName="...", passivateAsPrincipalName="...",
                   transTimeoutSeconds="7200", enableCallByReference=Bool.TRUE,
                   useCallerIdentity=Bool.FALSE)
    @MethodIsolationLevelPattern(pattern="*", isolationLevel=IsolationLevel.TRANSACTION_READ_COMMITTED)
    @RoleMapping(principals="...", roleName="...")
    Not sure why this is 'ejbgen' annotations, instead of just ejb or javaee general annotations... Arent there any more standard annotations or so in order to specify these configurations (rolemapping, MethodIsolationLevelPattern, Session, runas, createasprincipalname...) ?
    thanks

  • MTOM throws NullPointerException

    Hello,
    I need to transfer large files (12Mb) of diferent types (.pdf, .jpg, .doc, etc). I changed the return type to DataHandler and tried to enable MTOM in my webservice, but when I enabled it, after the method is executed, system throws a NullPointerException.
    I'm enabling MTOM with the annotation @MTOM, and if I just take off this annotation the webservice works correctly.
    Do you know of any problem using MTOM with Java 1.6.0_10? Do you have a suggestion of a better way to transfer it?
    Thanks

    Tested this with JDK 1.4 and it works with the following changes:
    Make these static:
    static public Writer out;
    static public void validateXml (String xmlSt)
    and, of course adding:
    import java.io.*;
    import org.xml.sax.*;
    import javax.xml.parsers.SAXParserFactory;
    Then here is what I used to test it:
    public class Test2 {
         static public void main(String args[]){
              System.out.println("Hi there");
              String s = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"> <html> <head> <title> Ho there </title> </head> <body> <h1> Hi there </h1> </body> </html>";
              try {
                   xmlResHandler.validateXml(s);
              }catch (Exception ex){
                   ex.printStackTrace();
    }I think you problem make have to do with your management of the "out" Writer.

  • Error to generate webservice from java file with JAXWS

    I need to build a webservice to run on Glassfish, but I have problems, I did downloaded the latest JAX-WS recently(2 days).
    I have the follow class to generate a wsdl file:
    package com.dudhoo.farmacopedia.web;
    import com.dudhoo.farmacopedia.web.hibernate.FarmacopediaKey;
    import com.dudhoo.farmacopedia.web.key.KeyGenerator;
    import java.util.Calendar;
    import java.util.Date;
    import javax.jws.WebMethod;
    import javax.jws.WebService;
    @WebService(serviceName="FarmacoWebService", name="nomeservice")  
    public class FarmacoWebService {
        public FarmacoWebService() {
        @WebMethod()
        public Date getServerTime(){
            return Calendar.getInstance().getTime();
        public FarmacopediaKey generateSerial(Date ini, int dias){
            return new KeyGenerator().generateKey(ini, dias);
    }I have the follow ant code:
    <?xml version="1.0" encoding="windows-1252" ?>
    <!--Ant buildfile generated by Oracle JDeveloper 10g-->
    <!--Generated 01/08/2006 22:56:00-->
    <project name="FarmacoWeb" default="all" basedir=".">
      <property file="build.properties"/>
      <path id="classpath">
        <fileset dir="../libs/" includes="**/*.jar"/>   
      </path>
      <path id="jaxws.classpath">
        <fileset dir="../libs/jaxws" includes="**/*.jar"/>   
      </path>
      <target name="init">
        <tstamp/>
        <mkdir dir="${output.dir}"/>
        <mkdir dir="${output.dir}/new"/>
        <mkdir dir="${output.dir}/res"/>
      </target>
      <target name="all" description="Build the project" depends="compile,copy"/>
      <target name="clean" description="Clean the project">
        <delete includeemptydirs="true" quiet="true">
          <fileset dir="${output.dir}" includes="**/*"/>
        </delete>
      </target>
      <target name="compile" description="Compile Java source files" depends="init">
        <javac destdir="${output.dir}" classpathref="classpath"
               debug="${javac.debug}" nowarn="${javac.nowarn}"
               deprecation="${javac.deprecation}" encoding="Cp1252" source="1.5"
               target="1.5">
          <src path="src"/>
        </javac>
      </target>
      <target name="copy" description="Copy files to output directory"
              depends="init">
        <patternset id="copy.patterns">
          <include name="**/*.gif"/>
          <include name="**/*.GIF"/>
          <include name="**/*.jpg"/>
          <include name="**/*.JPG"/>
          <include name="**/*.jpeg"/>
          <include name="**/*.JPEG"/>
          <include name="**/*.png"/>
          <include name="**/*.PNG"/>
          <include name="**/*.properties"/>
          <include name="**/*.xml"/>
          <include name="**/*-apf.xml"/>
          <include name="**/*.ejx"/>
          <include name="**/*.xcfg"/>
          <include name="**/*.cpx"/>
          <include name="**/*.dcx"/>
          <include name="**/*.wsdl"/>
          <include name="**/*.ini"/>
          <include name="**/*.tld"/>
          <include name="**/*.tag"/>
        </patternset>
        <copy todir="${output.dir}">
          <fileset dir="src">
            <patternset refid="copy.patterns"/>
          </fileset>
        </copy>
      </target>
      <target name="-pre-dist" >
            <taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen">
                <classpath refid="classpath"/>
            </taskdef>
            <wsgen
                debug="true"
                keep="true"
                destdir="${output.dir}/new"
                resourcedestdir="${output.dir}/res"
                sei="com.dudhoo.farmacopedia.web.FarmacoWebService">
                <classpath>
                    <pathelement path="${jaxws.classpath}"/>
                    <pathelement location="${output.dir}"/>               
                </classpath>
            </wsgen>
        </target>
    </project>When I run ant the the follow error is throwed:
    Buildfile: /home/duduzera/jdevhome/mywork/Farmaco/FarmacoWeb/build.xml
    -pre-dist:
        [wsgen] Problem encountered during annotation processing;
        [wsgen] see stacktrace below for more information.
        [wsgen] java.lang.NoSuchMethodError: javax.jws.WebMethod.exclude()Z
        [wsgen]      at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.hasWebMethods(WebServiceVisitor.java:373)
        [wsgen]      at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.shouldProcessWebService(WebServiceVisitor.java:349)
        [wsgen]      at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitClassDeclaration(WebServiceVisitor.java:143)
        [wsgen]      at com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(ClassDeclarationImpl.java:95)
        [wsgen]      at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.buildModel(WebServiceAP.java:345)
        [wsgen]      at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.process(WebServiceAP.java:230)
        [wsgen]      at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
        [wsgen]      at com.sun.tools.apt.comp.Apt.main(Apt.java:454)
        [wsgen]      at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:448)
        [wsgen]      at com.sun.tools.apt.main.Main.compile(Main.java:1075)
        [wsgen]      at com.sun.tools.apt.main.Main.compile(Main.java:938)
        [wsgen]      at com.sun.tools.apt.Main.processing(Main.java:95)
        [wsgen]      at com.sun.tools.apt.Main.process(Main.java:85)
        [wsgen]      at com.sun.tools.apt.Main.process(Main.java:67)
        [wsgen]      at com.sun.tools.ws.wscompile.CompileTool.buildModel(CompileTool.java:603)
        [wsgen]      at com.sun.tools.ws.wscompile.CompileTool.run(CompileTool.java:536)
        [wsgen]      at com.sun.tools.ws.util.ToolBase.run(ToolBase.java:54)
        [wsgen]      at com.sun.tools.ws.ant.WsGen.execute(WsGen.java:457)
        [wsgen]      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        [wsgen]      at org.apache.tools.ant.Task.perform(Task.java:364)
        [wsgen]      at org.apache.tools.ant.Target.execute(Target.java:341)
        [wsgen]      at org.apache.tools.ant.Target.performTasks(Target.java:369)
        [wsgen]      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
        [wsgen]      at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
        [wsgen]      at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
        [wsgen]      at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        [wsgen]      at oracle.jdevimpl.ant.runner.AntLauncher.launch(AntLauncher.java:321)
        [wsgen]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        [wsgen]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        [wsgen]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        [wsgen]      at java.lang.reflect.Method.invoke(Method.java:585)
        [wsgen]      at oracle.jdevimpl.ant.runner.InProcessAntStarter.runAnt(InProcessAntStarter.java:293)
        [wsgen]      at oracle.jdevimpl.ant.runner.InProcessAntStarter.mav$runAnt(InProcessAntStarter.java)
        [wsgen]      at oracle.jdevimpl.ant.runner.InProcessAntStarter$1.run(InProcessAntStarter.java:71)
        [wsgen] error: compilation failed, errors should have been reported
        [wsgen]
    BUILD SUCCESSFUL
    Total time: 3 secondsI'm using JDeveloper 10g. Did someone had problems like this?
    I think the problem maybe is caused by jar lib concurrences...
    thanks

    You get that error when response headers have already been sent to the client (browser). This can happen in two ways that I know of:
    - you flushed data to the client, or somewhere the data was automatically flushed
    - you already did a redirect/forward and are attempting to do a second one.
    So if you want to prevent yourself from getting the error, you'll need to make sure that neither of the situations has occurred. Don't output content unless you are absolutely certain that you won't need to foward/redirect later and don't do a redirect/forward twice in the same resource.

Maybe you are looking for

  • Lost all purchased music

    I recently lost my phone, and I lost all my data. When I got it back and signed on the iTunes store, it showed that I did not purchase any music, although I did. The two e-mail addresses used to purchase the music won't work. How can I get my music b

  • JRadioButton Event Handling Help???

    Hello everyone. I have been working on this program for a while now and it is just bugging me. It is a stoplight in which the lights are turned on by radio buttons. I have all the code but for some reason my radio buttons do not work. I have a listen

  • Has anyone fixed the ringer issue with 4s?

    I have tried the alcohol, the compressed air to clean the connection, the verification that the ringer tone is still available... anyone?

  • JUL09 CPU Patch for EMREP DB.

    All, I recently installed 10gR5 Grid Control, and the database that comes bundled with the installation is Oracle Database 10g 10.1.0.5.0. Well the JUL09 CPU Patch for this database was released, but the patch is in extended support. What does the co

  • Podcast seems to time out when downloading

    When I start a download of a podcast, it will download for a minute or so and if the podcast is not fully downloaded, I tunes stops down loading the file.