Package org.apache.ws.addressing

Examples of org.apache.ws.addressing.XmlBeansEndpointReference


    {
        EndpointReferenceType[] mgmtEPRs = m_service.getManageabilityReferences();
        assertTrue( "Response to GetManageabilityReferences operation did not contain any EPRs.", mgmtEPRs.length != 0 );
        for ( int i = 0; i < mgmtEPRs.length; i++ )
        {
            ResourceStub mgmtResource = new ResourceStub( new XmlBeansEndpointReference( mgmtEPRs[i] ) );
            XmlObject idPropElem = getSingleProperty( mgmtResource, IdentityCapability.PROP_NAME_RESOURCE_ID );
            assertTrue( idPropElem instanceof XmlAnyURI );
            XmlObject[] capabilityElems = mgmtResource.getResourceProperty(
                    ManageabilityCharacteristicsCapability.PROP_NAME_MANAGEABILITY_CAPABILITY );
            assertContainsURI( capabilityElems, IdentificationCapability.URI );
View Full Code Here


                RelationshipParticipantType relationshipParticipantType = participantArray[j];
                EndpointReferenceType[] manageabilityEndpointReferenceArray = relationshipParticipantType.getManageabilityEndpointReferenceArray();
                for (int k = 0; k < manageabilityEndpointReferenceArray.length; k++)
                {
                    EndpointReferenceType endpointReferenceType = manageabilityEndpointReferenceArray[k];
                    ResourceStub resource = new ResourceStub(new XmlBeansEndpointReference(endpointReferenceType));
                    XmlObject[] resourceProperty = resource.getResourceProperty(WeatherstationPropertyQNames.FCCID);
                    assertTrue("Unable to invoke operation on resource.",resourceProperty.length == 1);
                }
            }
        }
View Full Code Here

        XmlQName match = (XmlQName) matchElems[0];
        assertEquals( WeatherstationPropertyQNames.FCCID, match.getQNameValue() );

        // get weather station resource #2
        EndpointReferenceDocument weatherStation2EprDoc = getEndpointReference( new URL( WEATHER_STATION_2_EPR_URL ) );
        ResourceStub resource2 = new ResourceStub(new XmlBeansEndpointReference( weatherStation2EprDoc.getEndpointReference()) ); //resource2

        assertEquals("FCCIDs did not match.", getFCCID(m_resource), getFCCID(resource2));
    }
View Full Code Here

                  throw new Exception( " unknown resource type" );
               }

               if ( ( epr != null ) && epr instanceof XmlBeansEndpointReference )
               {
                  XmlBeansEndpointReference eprType = (XmlBeansEndpointReference) epr;
                  XmlObject                 obj = eprType.getXmlObject(  );
                  if ( obj instanceof EndpointReferenceType )
                  {
                     eprs[i] = (EndpointReferenceType) obj;
                     i++;
                  }
View Full Code Here

                                           requestDoc.getCreate(  ).getCreateParams(  ) );
         }

         if ( epr instanceof XmlBeansEndpointReference )
         {
            XmlBeansEndpointReference eprType = (XmlBeansEndpointReference) epr;
            XmlObject                 obj = eprType.getXmlObject( ADRESSING_2004_08_NAMESPACE );
            if ( obj instanceof EndpointReferenceType )
            {
               response.setEndpointReference( (EndpointReferenceType) obj );
            }
            else
View Full Code Here

        }
    }

    private static EndpointReference createEpr(String filesystemUrl)
    {
        XmlBeansEndpointReference epr = null;
        try
        {
            EndpointReferenceDocument eprdoc = (EndpointReferenceDocument) XmlObject.Factory.parse(new URL(filesystemUrl));
            epr = new XmlBeansEndpointReference(eprdoc.getEndpointReference());
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
View Full Code Here

            actionType.setStringValue(action);
            actionElem = actionDoc;
        }
        XmlBeanUtils.addChildElement(header, toElem);
        XmlBeanUtils.addChildElement(header, actionElem);
        XmlBeansEndpointReference newepr = null;
        if (eprXBean.schemaType().getName().getNamespaceURI().equals(Constants.NS_URI_ADDRESSING_2003_03))
        {
            newepr = new XmlBeansEndpointReference((org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceType) eprXBean);
        }
        else
        {
            newepr = new XmlBeansEndpointReference((org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType) eprXBean);
        }
        if (newepr.getReferenceProperties() != null)
        {
            XmlObject[] refPropElems = (XmlObject[]) newepr.getReferenceProperties();
            for (int i = 0; i < refPropElems.length; i++)
            {
                XmlBeanUtils.addChildElement(header, refPropElems[i]);
            }
        }
View Full Code Here

        CreationNotificationDocument creationNotificationDocument = CreationNotificationDocument.Factory.newInstance();
        org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.CreationNotificationDocument.CreationNotification creationNotification = creationNotificationDocument.addNewCreationNotification();
        EndpointReference endpointReference = event.getEndpointReference();
        if(endpointReference != null && endpointReference instanceof XmlBeansEndpointReference)
        {
            XmlBeansEndpointReference xmlepr = (XmlBeansEndpointReference)endpointReference;
            XmlObject xmlObject = xmlepr.getXmlObject(org.apache.ws.addressing.v2004_08_10.AddressingConstants.NSURI_ADDRESSING_SCHEMA);
            if(xmlObject instanceof EndpointReferenceType)
            {
                creationNotification.setManageabilityEndpointReferenceArray(new EndpointReferenceType[]{(EndpointReferenceType)xmlObject});
                try
                {
View Full Code Here

      String endpointAddress =
         JaxRpcPlatform.getJaxRpcPlatform(  ).getEndpointUrl( getBaseWebappUrl(  ),
                                                              getServiceName(  ).getLocalPart(  ) );
      String wsAddressingURI = getNamespaceVersionHolder(  ).getAddressingNamespace(  );

      XmlBeansEndpointReference xmlBeansEndpointReference =
         new XmlBeansEndpointReference( endpointAddress, wsAddressingURI );
      xmlBeansEndpointReference.setResourceIdentifierReferenceParameterName( getResourceIdentifierReferenceParameterQName(  ) );
      xmlBeansEndpointReference.setResourceIdentifier( resourceId );
      xmlBeansEndpointReference.setPortTypeQName( getPortType(  ) );
      xmlBeansEndpointReference.setServicePortName( getServicePortName(  ) );
      xmlBeansEndpointReference.setServiceQName( getServiceName(  ) );
      return xmlBeansEndpointReference;
   }
View Full Code Here

         JaxRpcPlatform.getJaxRpcPlatform(  ).getEndpointUrl( WsrfRuntime.getRuntime(  ).getBaseWebappUrl(  )
                                                                         .toString(  ),
                                                              getServiceName(  ).getLocalPart(  ) );
      String wsAddressingURI = getNamespaceSet(  ).getAddressingNamespace(  );

      XmlBeansEndpointReference xBeansEPR = new XmlBeansEndpointReference( endpointAddress, wsAddressingURI );
      if ( resourceId != null )
      {
         XmlObject resourceIdRefParam = XmlBeanUtils.createElement( m_resourceIdRefParamName );
         XmlBeanUtils.setValue( resourceIdRefParam,
                                resourceId.toString(  ) );
         xBeansEPR.addReferenceParameter( resourceIdRefParam );
      }

      xBeansEPR.setPortTypeQName( getPortType(  ) );
      xBeansEPR.setServicePortName( getServicePortName(  ) );
      xBeansEPR.setServiceQName( getServiceName(  ) );
      return xBeansEPR;
   }
View Full Code Here

TOP

Related Classes of org.apache.ws.addressing.XmlBeansEndpointReference

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.