The portal includes an AbstractSOAPProviderEntity class that implements all required methods of IProviderEntity and ITransformationProviderEntity interfaces in order to make SOAP requests.
You need, however, to implement the createRequestMessage() method, which returns the SOAP message as defined in the content provider's WSDL.
Create a class that extends AbstractSOAPProviderEntity.
Implement the createMessage() method, which should return a SOAP message for retrieving the XML source. The following is an example:
Syntax
protected SOAPMessage createRequestMessage() throws ContentProviderException, SOAPException { // Create SOAP Envelope SOAPMessage msg = createBasicEnvelope(); SOAPEnvelope env = msg.getSOAPPart().getEnvelope(); SOAPBody body = env.getBody(); // Create GetNewsstandHeadlines Element SOAPElement getNewsStandHlElement = body.addChildElement( env.createName("GetNewsstandHeadlines","", ICPService.CP_NS_DEV2_1_PARSERS)); // Create sectionIDs Element SOAPElement sectionIdsElm = getNewsStandHlElement.addChildElement( env.createName("sectionIDs","", ICPService.CP_NS_DEV2_1_PARSERS)); // Create sectionID Element SOAPElement sectionIDElm = sectionIdsElm.addChildElement( env.createName("sectionID","", ICPService.CP_NS_DEV2_1_PARSERS)); // Create Section Code sectionIDElm.addTextNode( m_sourcePropertiesHandler.getParameterValue( m_request,"sectionCode")); return msg; }
If necessary, override the doInit() method.
If necessary, override the getGeneralParameters() method. This method defines parameters that are passed to all the transformers associated with this entity.
If necessary, override the getEntityTransformerParams() method. This method can be used to pass different key-value pairs to different transformers associated with this entity. You can determine the current transformer by examining the ITransformerInformation object passed into the method.