Package org.jboss.test.ws.interop.nov2007.wsaSoap12

Examples of org.jboss.test.ws.interop.nov2007.wsaSoap12.ObjectFactory


            final XMLSecurityProperties securityProperties) throws XMLSecurityException {
        KeyInfoType keyInfoType = new KeyInfoType();
        SecurityTokenReferenceType securityTokenReferenceType = new SecurityTokenReferenceType();
        ReferenceType referenceType = new ReferenceType();
        referenceType.setURI("#" + encryptedKeyType.getId());
        ObjectFactory objectFactory = new ObjectFactory();
        securityTokenReferenceType.getAny().add(objectFactory.createReference(referenceType));
        keyInfoType.getContent().add(objectFactory.createSecurityTokenReference(securityTokenReferenceType));
        inputProcessorChain.addProcessor(
                new DecryptInputProcessor(keyInfoType, encryptedKeyType.getReferenceList(),
                        (WSSSecurityProperties) securityProperties,
                        (WSInboundSecurityContext) inputProcessorChain.getSecurityContext())
                );
View Full Code Here


   {
      String text = "Hello!";
      ObjectFactory factory = new ObjectFactory();
      DataSet dataSet = new DataSet();
      dataSet.setAny(factory.createAnyType(text));
      Request request = new Request();
      request.setAny(factory.createDataSet(dataSet));
      EchoDataSetResult echoDataSetResult = port.echoDataSet(request);
      assertNotNull(echoDataSetResult);
      assertEquals(text, ((JAXBElement)((JAXBElement<DataSet>)echoDataSetResult.getAny()).getValue().getAny()).getValue());
   }
View Full Code Here

      ObjectFactory factory = new ObjectFactory();
      DataSet dataSet = new DataSet();
      dataSet.setAny(factory.createAnyType(text));
      Request request = new Request();
      request.setAny(factory.createDataSet(dataSet));
      EchoDataSetResult echoDataSetResult = port.echoDataSet(request);
      assertNotNull(echoDataSetResult);
      assertEquals(text, ((JAXBElement)((JAXBElement<DataSet>)echoDataSetResult.getAny()).getValue().getAny()).getValue());
   }
View Full Code Here

   @SuppressWarnings("unchecked")
   public EchoDataSetResult echoDataSet(Request request)
   {
      System.out.println("echoDataSet, request=" + request);
      EchoDataSetResult result = new EchoDataSetResult();
      if (request != null)
      {
         Object any = request.getAny();
         System.out.println("echoDataSet, request.getAny()="+any);
         if (any != null)
         {
            try
            {
               JAXBElement<DataSet> jaxbEl = (JAXBElement<DataSet>)any;
               JAXBElement inner = (JAXBElement)(jaxbEl.getValue().getAny());
               System.out.println("echoDataSet, DataSet inner value=" + inner.getValue());
            } catch (Exception e) {}
         }
         result.setAny(request.getAny());
      }
      return result;
   }
View Full Code Here

   {
      String text = "Hello!";
      ObjectFactory factory = new ObjectFactory();
      org.jboss.test.ws.interop.nov2007.wsse.EchoXml.Request request = new org.jboss.test.ws.interop.nov2007.wsse.EchoXml.Request();
      request.setAny(factory.createAnyType(text));
      EchoXmlResult result = port.echoXml(request);
      assertNotNull(result);
      assertEquals(text, ((JAXBElement)result.getAny()).getValue());
   }
View Full Code Here

   @SuppressWarnings("unchecked")
   public EchoXmlResult echoXml(org.jboss.test.ws.interop.nov2007.wsse.EchoXml.Request request)
   {
      System.out.println("echoXml, request=" + request);
      EchoXmlResult result = new EchoXmlResult();
      if (request != null)
      {
         Object any = request.getAny();
         System.out.println("echoXml, request.getAny()=" + any);
         if (any != null)
         {
            try
            {
               System.out.println("echoXml, inner value=" + ((JAXBElement)any).getValue());
            } catch (Exception e) {}
         }
         result.setAny(request.getAny());        
      }
      return result;
   }
View Full Code Here

        SgDerivedTypeB derivedB = new SgDerivedTypeB();
        derivedB.setVarInt(new BigInteger("32"));
        derivedB.setVarString("foo");

        ObjectFactory objectFactory = new ObjectFactory();

        StructWithSubstitutionGroup x = new StructWithSubstitutionGroup();
        JAXBElement<? extends SgBaseTypeA> elementA = objectFactory.createSg01BaseElementA(baseA);
        x.setSg01BaseElementA(elementA);
        StructWithSubstitutionGroup yOrig = new StructWithSubstitutionGroup();
        JAXBElement<? extends SgBaseTypeA> elementB = objectFactory.createSg01DerivedElementB(derivedB);
        yOrig.setSg01BaseElementA(elementB);

        Holder<StructWithSubstitutionGroup> y = new Holder<StructWithSubstitutionGroup>(yOrig);
        Holder<StructWithSubstitutionGroup> z = new Holder<StructWithSubstitutionGroup>();
        StructWithSubstitutionGroup ret;
View Full Code Here

    public void testStructWithSubstitutionGroupAbstract() throws Exception {
        SgDerivedTypeB derivedB = new SgDerivedTypeB();
        derivedB.setVarInt(new BigInteger("32"));
        derivedB.setVarString("foo");

        ObjectFactory objectFactory = new ObjectFactory();
        JAXBElement<SgDerivedTypeB> elementB = objectFactory.createSg03DerivedElementB(derivedB);

        SgDerivedTypeC derivedC = new SgDerivedTypeC();
        derivedC.setVarInt(new BigInteger("32"));
        derivedC.setVarFloat(3.14f);

        JAXBElement<SgDerivedTypeC> elementC = objectFactory.createSg03DerivedElementC(derivedC);

        StructWithSubstitutionGroupAbstract x = new StructWithSubstitutionGroupAbstract();
        x.setSg03AbstractBaseElementA(elementC);
        StructWithSubstitutionGroupAbstract yOrig = new StructWithSubstitutionGroupAbstract();
        yOrig.setSg03AbstractBaseElementA(elementB);
View Full Code Here

        }
    }
   
    public void testStructWithSubstitutionGroupNil() throws Exception {
        StructWithSubstitutionGroupNil x = new StructWithSubstitutionGroupNil();
        ObjectFactory objectFactory = new ObjectFactory();
        JAXBElement<? extends SgBaseTypeA> element = objectFactory.createSg04NillableBaseElementA(null);
        x.setSg04NillableBaseElementA(element);
        StructWithSubstitutionGroupNil yOrig = new StructWithSubstitutionGroupNil();
        element = objectFactory.createSg04NillableBaseElementA(null);
        yOrig.setSg04NillableBaseElementA(element);

        Holder<StructWithSubstitutionGroupNil> y = new Holder<StructWithSubstitutionGroupNil>(yOrig);
        Holder<StructWithSubstitutionGroupNil> z = new Holder<StructWithSubstitutionGroupNil>();
        StructWithSubstitutionGroupNil ret;
View Full Code Here

       
        SgDerivedTypeC derivedC = new SgDerivedTypeC();
        derivedC.setVarInt(new BigInteger("1"));
        derivedC.setVarFloat(3.14f);
       
        ObjectFactory objectFactory = new ObjectFactory();
        JAXBElement<? extends SgBaseTypeA> x1 = objectFactory.createSg01DerivedElementB(derivedB);
        JAXBElement<? extends SgBaseTypeA> x2 = objectFactory.createSg02BaseElementA(baseA);
        JAXBElement<? extends SgBaseTypeA> y1 = objectFactory.createSg01DerivedElementB(derivedB);
        JAXBElement<? extends SgBaseTypeA> y2 = objectFactory.createSg02DerivedElementC(derivedC);
       
        StructWithMultipleSubstitutionGroups x = new StructWithMultipleSubstitutionGroups();
        x.setVarFloat(111.1f);
        x.setVarInt(new BigInteger("100"));
        x.setVarString("x-varString");
View Full Code Here

TOP

Related Classes of org.jboss.test.ws.interop.nov2007.wsaSoap12.ObjectFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.