|
Home TOC |
|
Tutorial
This section will walk you through the basics of sending a SOAP message using the JAXM API. At the end of this chapter, you will know how to do the following:
- Get a connection
- Create a message
- Add content to a message
- Send the message
- Retrieve the content in a message and an attachment
First, we'll walk through the steps in sending a request-response message for a client that does not use a messaging provider. Then we'll do a walkthrough of a client that uses a messaging provider sending a one-way message. Both types of client may add attachments to a message, so adding attachments is covered last as a separate topic.
Client without a Messaging Provider
An application that does not use a messaging provider is limited to operating in a client role and can send only request-response messages. Though limited, it can make use of Web services that are implemented to do request-response messaging.
Getting a SOAPConnection Object
The first thing any JAXM client needs to do is get a connection, either a
SOAPConnectionobject or aProviderConnectionobject. The overview section discusses these two types of connections and how they are used.A client that does not use a messaging provider has only one choice for creating a connection, which is to create a
SOAPConnectionobject. This kind of connection is a point-to-point connection, meaning that it goes directly from the sender to the URL that the sender specifies.The first step is to obtain a
SOAPConnectionFactoryobject that you can use to create your connection. The JAXM API makes this easy by providing theSOAPConnectionFactoryclass with a default implementation. You can get an instance of this implementation with the following line of code.SOAPConnectionFactory scFactory = SOAPConnectionFactory.newInstance();Notice that because
newInstanceis a static method, you will always use the class nameSOAPConnectionFactorywhen you invoke itsnewInstancemethod.Now you can use
scFactoryto create aSOAPConnectionobject.SOAPConnection con = scFactory.createConnection();You will use
conlater to send the message that is created in the next part.Creating a Message
The next step is to create a message, which you do using a
MessageFactoryobject. If you are a standalone client, you can use the default implementation of theMessageFactoryclass that the JAXM API provides. The following code fragment illustrates getting an instance of this default message factory and then using it to create a message.MessageFactory factory = MessageFactory.newInstance(); SOAPMessage message = factory.createMessage();As is true of the
newInstancemethod forSOAPConnectionFactory, thenewInstancemethod forMessageFactoryis static, so you invoke it by callingMessageFactory.newInstance. Note that it is possible to write your own implementation of a message factory and plug it in via system properties, but the default message factory will almost always be the one that is used.The other way to get a
MessageFactoryobject is to retrieve it from a naming service where it has been registered. This way is available only to applications that use a messaging provider, and it will be covered later.Parts of a Message
A
SOAPMessageobject is required to have certain elements, and the JAXM API simplifies things for you by returning a newSOAPMessageobject that already contains these elements. Somessage, which was created in the preceding line of code, has the following:I. A
SOAPPartobject that containsA. A
SOAPEnvelopeobject that containsThe
SOAPHeaderobject, though optional, is included for convenience because most messages will use it. TheSOAPBodyobject can hold the content of the message and can also contain fault messages that contain status information or details about a problem with the message.Accessing Elements of a Message
The next step in creating a message is to access its parts so that content can be added. The
SOAPMessageobjectmessage, created in the previous code fragment, is where to start. It contains aSOAPPartobject, so you usemessageto retrieve it.SOAPPart soapPart = message.getSOAPPart();Next you can use
soapPartto retrieve theSOAPEnvelopeobject that it contains.SOAPEnvelope envelope = soapPart.getEnvelope();You can now use
envelopeto retrieve its emptySOAPHeaderandSOAPBodyobjects.SOAPHeader header = envelope.getHeader(); SOAPBody body = envelope.getBody();Our example of a standalone client does not use a SOAP header, so you will need to delete it. Because all
SOAPElementobjects, includingSOAPHeaderobjects, are derived from theNodeinterface, you use the methodNode.detachNodeto deleteheader.header.detachNode();Adding Content to the Body
To add content to the body, you need to create a
SOAPBodyElementobject to hold the content. When you create any new element, you also need to create an associatedNameobject to identify it.Nameobjects are created usingSOAPEnvelopemethods, so you can useenvelopefrom the previous code fragment to create theNameobject for your new element.
Nameobjects associated withSOAPBodyandSOAPHeaderobjects must be fully qualified; that is, they must be created with a local name, a prefix for the namespace being used, and a URI for the namespace. Specifying a namespace for an element makes clear which one is meant if there is more than one element with the same local name.The code fragment that follows retrieves the
SOAPBodyobjectbodyfromenvelope, creates aNameobject for the element to be added, and adds a newSOAPBodyElementobject tobody.SOAPBody body = envelope.getBody(); Name bodyName = envelope.createName("GetLastTradePrice", "m", "http://wombat.ztrade.com"); SOAPBodyElement gltp = body.addBodyElement(bodyName);At this point,
bodycontains aSOAPBodyElementobject identified by theNameobjectbodyName, but there is still no content ingltp. Assuming that you want to get a quote for the stock of Sun Microsystems, Inc., you need to create a child element for the symbol using the methodaddChildElement. Then you need to give it the stock symbol using the methodaddTextNode. TheNameobject for the newSOAPElementobjectsymbolis initialized with only a local name, which is allowed for child elements.Name name = envelope.createName("symbol"); SOAPElement symbol = gltp.addChildElement(name); symbol.addTextNode("SUNW");You might recall that the headers and content in a
SOAPPartobject must be in XML format. The JAXM API takes care of this for you, building the appropriate XML constructs automatically when you call methods such asaddBodyElement,addChildElement, andaddTextNode. Note that you can call the methodaddTextNodeonly on an element such asbodyElementor any child elements that are added to it. You cannot calladdTextNodeon aSOAPHeaderorSOAPBodyobject.The content that you have just added to your
SOAPBodyobject will look like the following when it is sent over the wire:<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" <SOAP-ENV:Body> <m:GetLastTradePrice xmlns:m= "http://wombat.ztrade.com"> <symbol>SUNW</symbol> </m:GetLastTradePrice> </SOAP-ENV:Body> </SOAP-ENV:Envelope>Let's examine this XML excerpt line by line to see how it relates to your JAXM code. Note that an XML parser does not care about indentations, but they are generally used to indicate element levels and thereby make it easier for a human reader to understand.
SOAPPart soapPart = message.getSOAPPart(); SOAPEnvelope envelope = soapPart.getEnvelope();<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" . . . . . . (intervening elements omitted) </SOAP-ENV:Envelope>The outermost element in this XML example is the SOAP envelope element, indicated by
SOAP-ENV:Envelope.Envelopeis the name of the element, andSOAP-ENVis the namespace prefix. The interfaceSOAPEnveloperepresents a SOAP envelope.The first line signals the beginning of the SOAP envelope element, and the last line signals the end of it; everything in between is part of the SOAP envelope. The second line has an attribute for the SOAP envelope element.
xmlnsstands for "XML namespace," and its value is the URI of the namespace associated withEnvelope. This attribute is automatically included for you.SOAPBody body = envelope.getBody();<SOAP-ENV:Body> . . . . . . </SOAP-ENV:Body>These two lines mark the beginning and end of the SOAP body, represented in JAXM by a
SOAPBodyobject.Name bodyName = envelope.createName("GetLastTradePrice", "m", "http://wombat.ztrade.com"); SOAPBodyElement gltp = body.addBodyElement(bodyName);<m:GetLastTradePrice xmlns:m= "http://wombat.ztrade.com"> . . . . </m:GetLastTradePrice>These lines are what the
SOAPBodyElementgltpin your code represents. "GetLastTradePrice" is its local name, "m" is its namespace prefix, and "http://wombat.ztrade.com" is its namespace URI.Name name = envelope.createName("symbol"); SOAPElement symbol = gltp.addChildElement(name); symbol.addTextNode("SUNW");<symbol>SUNW</symbol>The
String"SUNW"is the message content that your recipient, the stock quote service, receives.Sending a Message
A standalone client uses a
SOAPConnectionobject and must therefore use theSOAPConnectionmethodcallto send a message. This method takes two arguments, the message being sent and the destination to which the message should go. This message is going to the stock quote service indicated by theURLEndpointobjectendpoint.URLEndpoint endpoint = new URLEndpoint( "http://wombat.ztrade.com/quotes"); SOAPMessage response = con.call(message, endpoint);Your message sent the stock symbol SUNW; the
SOAPMessageobjectresponseshould contain the last stock price for Sun Microsystems, which you will retrieve in the next section.A connection uses a fair amount of resources, so it is a good idea to close a connection as soon as you are through using it.
con.close();Getting the Content of a Message
The initial steps for retrieving a message's content are the same as those for giving content to a message: You first access the
SOAPBodyobject, using the message to get the envelope and the envelope to get the body. Then you access itsSOAPBodyElementobject because that is the element to which content was added in the example. (In a later section you will see how to add content directly to theSOAPBodyobject, in which case you would not need to access theSOAPBodyElementobject for adding content or for retrieving it.) To get the content, which was added with the methodNode.addTextNode, you call the methodNode.getValue. Note thatgetValuereturns the value of the immediate child of the element that calls the method. Therefore, in the following code fragment,getValueis called onbodyElement, the element on which the methodaddTextNodewas called.In order to access
bodyElement, you need to call the methodgetChildElementonbody. PassingbodyNametogetChildElementreturns ajava.util.Iteratorobject that contains all of the child elements identified by theNameobjectbodyName. You already know that there is only one, so just calling the methodnexton it will return theSOAPBodyElementyou want. Note that the methodIterator.nextreturns a JavaObject, so it is necessary to cast theObjectit returns to aSOAPBodyElementobject before assigning it to the variablebodyElement.SOAPPart sp = response.getSOAPPart(); SOAPEnvelop env = sp.getEnvelope(); SOAPBody sb = sp.getBody(); java.util.Iterator it = sb.getChildElements(bodyName); SOAPBodyElement bodyElement = (SOAPBodyElement)it.next(); String lastPrice = bodyElement.getValue(); System.out.print("The last price for SUNW is");System.out.println(lastPrice);If there were more than one element with the name
bodyName, you would have had to use awhileloop using the methodIterator.hasNextto make sure that you got all of them.while (it.hasNext()) { SOAPBodyElement bodyElement = (SOAPBodyElement)it.next(); String lastPrice = bodyElement.getValue(); System.out.print("The last price for SUNW is");System.out.println(lastPrice); }At this point, you have seen how to send a request-response message as a standalone client. You have also seen how to get the content from the response. The next part shows you how to send a message using a messaging provider.
Client with a Messaging Provider
Using a messaging provider gives you more flexibility than a standalone client has because it can take advantage of the additional functionality that a messaging provider can offer.
Getting a ProviderConnection Object
Whereas a
SOAPConnectionobject is a point-to-point connection directly to a particular URL, aProviderConnectionobject is a connection to a messaging provider. With this kind of connection, all messages that you send or receive go through the messaging provider.As with getting a
SOAPConnectionobject, the first step is to get a connection factory, but in this case, it is aProviderConnectionFactoryobject. You can obtain aProviderConnectionFactoryobject by retrieving it from a naming service. This is possible when your application is using a messaging provider and is deployed in a servlet or J2EE container. With aProviderConnectionFactoryobject, you can create a connection to a particular messaging provider and thus be able to use the capabilities of a profile that the messaging provider supports.To get a
ProviderConnectionFactoryobject, you first supply the logical name of your messaging provider to the container at deployment time. This is the name associated with your messaging provider that has been registered with a naming service based on the Java Naming and Directory Interface("JNDI"). You can then do a lookup using this name to obtain a
ProviderConnectionFactoryobject that will create connections to your messaging provider. For example, if the name registered for your messaging provider is "ProviderABC", you can do a lookup on "ProviderABC" to get aProviderConnectionFactoryobject and use it to create a connection to your messaging provider. This is what is done in the following code fragment. The first two lines use methods from the JNDI API to retrieve theProviderConnectionFactoryobject, and the last line uses a method from the JAXM API to create the connection to the messaging provider. Note that because the JNDI methodlookupreturns a JavaObject, you must convert it to aProviderConnectionFactoryobject before assigning it to the variablepcFactory.Context ctx = new InitialContext(); ProviderConnectionFactory pcFactory = (ProviderConnectionFactory)ctx.lookup("ProviderABC"); ProviderConnection pcCon = pcFactory.createConnection();You will use
pcCon, which represents a connection to your messaging provider, to get information about your messaging provider and to send the message you will create in the next section.Creating a Message
You create all JAXM messages by getting a
MessageFactoryobject and using it to create theSOAPMessageobject. For the standalone client example, you simply used the defaultMessageFactoryobject obtained via the methodMessageFactory.newInstance. However, when you are using a messaging provider, you obtain theMessageFactoryobject in a different way.Getting a MessageFactory
If you are using a messaging provider, you create a
MessageFactoryobject by using the methodProviderConnection.createMessageFactory. In addition, you pass it aStringindicating the profile you want to use. To find out which profiles your messaging provider supports, you need to get aProviderMetaDataobject with information about your provider. This is done by calling the methodgetMetaDataon the connection to your provider. Then you need to call the methodgetSupportedProfilesto get an array of the profiles your messaging provider supports. Supposing that you want to use the ebXML profile, you need to see if any of the profiles in the array matches "ebxml". If there is a match, that profile is assigned to the variableprofile, which can then be passed to the methodcreateMessageFactory.ProviderMetaData metaData = pcCon.getMetaData(); String[] supportedProfiles = metaData.getSupportedProfiles(); String profile = null; for (int i=0; i < supportedProfiles.length; i++) { if (supportedProfiles[i].equals("ebxml")) { profile = supportedProfiles[i]; break; } } MessageFactory factory = pcCon.createMessageFactory(profile);You can now use
factoryto create aSOAPMessageobject that conforms to the ebXML profile. This example uses the minimal ebXML profile used in the JAXM RI. Note that the following line of code uses the classEbXMLMEssageImpl, which is defined in the JAXM RI and is not part of the JAXM API.EbXMLMessageImpl message = (EbXMLMessageImpl)factory. createMessage();For this profile, you need to indicate the
Endpointobjects for the sender and the receiver. This information will appear in the message's header, and the messaging provider will use it to determine where to send the message. The following lines of code use the methodssetSenderandsetReceiver, which are provided by the ebXML profile implemented in the JAXM RI. These methods not only create aSOAPHeaderobject but also give it content. You can use these methods because yourSOAPMessageobject is anEbXMLMessageImplobject, giving you access to the methods defined inEbXMLMessageImpl.message.setSender(new Party("http://grand.products.com")); message.setReceiver(new Party("http://whiz.gizmos.com"));If you are not using a profile or you want to set content for a header not covered by your profile's implementation, you need to follow the steps shown in the next section.
Adding Content to the Header
To add content to the header, you need to create a
SOAPHeaderElementobject. As with all new elements, it must have an associatedNameobject, which you create using the message'sSOAPEnvelopeobject.The following code fragment retrieves the
SOAPHeaderobject fromenvelopeand adds a newSOAPHeaderElementobject to it.SOAPHeader header = envelope.getHeader(); Name headerName = envelope.createName("Purchase Order", "PO", "http://www.sonata.com/order"); SOAPHeaderElement headerElement = header.addHeaderElement(headerName);At this point,
headercontains theSOAPHeaderElementobjectheaderElementidentified by theNameobjectheaderName. Note that theaddHeaderElementmethod both createsheaderElementand adds it toheader.Now that you have identified
headerElementwithheaderNameand added it toheader, the next step is to add content toheaderElement, which the next line of code does with the methodaddTextNode.headerElement.addTextNode("order");Now you have the
SOAPHeaderobjectheaderthat contains aSOAPHeaderElementobject whose content is "order".Adding Content to the SOAP Body
The process for adding content to the
SOAPBodyobject is the same for clients using a messaging provider as it is for standalone clients. This is also the same as the process for adding content to theSOAPHeaderobject. You access theSOAPBodyobject, add aSOAPBodyElementobject to it, and add text to theSOAPBodyElementobject. It is possible to add additionalSOAPBodyElementobjects, and it is possible to add subelements to theSOAPBodyElementobjects with the methodaddChildElement. For each element or child element, you add content with the methodaddTextNode.The section on the standalone client demonstrated adding one
SOAPBodyElementobject, adding a child element, and giving it some text. The following example shows adding more than oneSOAPBodyElementand adding text to each of them.The code first creates the
SOAPBodyElementobjectpurchaseLineItems, which has a fully-qualified namespace associated with it. That is, theNameobject for it has a local name, a namespace prefix, and a namespace URI. As you saw earlier, aSOAPBodyElementobject is required to have a fully-qualified namespace, but child elements added to it may haveNameobjects with only the local name.SOAPBody body = envelope.getBody(); Name bodyName = envelope.createName("PurchaseLineItems", "PO", "http://sonata.fruitsgalore.com"); SOAPBodyElement purchaseLineItems = body.addBodyElement(bodyName); Name childName = envelope.createName("Order"); SOAPElement order = purchaseLineItems.addChildElement(childName); childName = envelope.createName("Product"); SOAPElement product = order.addChildElement(childName); product.addTextNode("Apple"); childName = envelope.createName("Price"); SOAPElement price = order.addChildElement(childName); price.addTextNode("1.56"); childName = envelope.createName("Order"); SOAPElement order2 = purchaseLineItems.addChildElement(childName); childName = envelope.createName("Product"); SOAPElement product2 = order2.addChildElement(childName); product2.addTextNode("Peach"); childName = envelope.createName("Price"); SOAPElement price2 = order2.addChildElement(childName); price2.addTextNode("1.48");The JAXM code in the preceding example produces the following XML in the SOAP body:
<PO:PurchaseLineItems xmlns:PO="http://www.sonata.fruitsgalore/order"> <Order> <Product>Apple</Product> <Price>1.56</Price> </Order> <Order> <Product>Peach</Product> <Price>1.48</Price> </Order> </PO:PurchaseLineItems>Adding Content to the SOAPPart Object
If the content you want to send is in a file, JAXM provides an easy way to add it directly to the
SOAPPartobject. This means that you do not access theSOAPBodyobject and build the XML content yourself, as you did in the previous section.To add a file directly to the
SOAPPartobject, you use ajavax.xml.transform.Sourceobject from JAXP (the JavaAPI for XML Processing). There are three types of
Sourceobjects:SAXSource,DOMSource, andStreamSource. AStreamSourceobject holds content as an XML document.SAXSourceandDOMSourceobjects hold content along with the instructions for transforming the content into an XML document.The following code fragment uses JAXP API to build a
DOMSourceobject that is passed to theSOAPPart.setContentmethod. The first two lines of code get aDocumentBuilderFactoryobject and use it to create theDocumentBuilderobjectbuilder. Thenbuilderparses the content file to produce aDocumentobject, which is used to initialize a newDOMSourceobject.DocumentBuilderFactory dbFactory = DocumentBuilderFactory. newInstance(); DocumentBuilder builder = dbFactory.newDocumentBuilder(); Document doc = builder.parse("file:///music/order/soap.xml"); DOMSource domSource = new DOMSource(doc);The following two lines of code access the
SOAPPartobject and set the newDOMSourceobject as its content. The methodSOAPPart.setContentnot only sets content for theSOAPBodyobject but also sets the appropriate header for theSOAPHeaderobject.SOAPPart soapPart = envelope.getSOAPPart(); soapPart.setContent(domSource);You will see other ways to add content to a message in the section on
AttachmentPartobjects. One big difference to keep in mind is that aSOAPPartobject must contain only XML data, whereas anAttachmentPartobject may contain any type of content.Sending the Message
When the connection is a
ProviderConnectionobject, messages have to be sent using the methodProviderConnection.send. This method sends the message passed to it and returns immediately. Unlike theSOAPConnectionmethodcall, it does not have to block until it receives a response, which leaves the application free to do other things.The
sendmethod takes only one argument, the message to be sent. It does not need to be given the destination because the messaging provider can use information in the header to figure out where the message needs to go.pcCon.send(message); pcCon.close();Adding Attachments
Adding
AttachmentPartobjects to a message is the same for all clients, whether they use a messaging provider or not. As noted in earlier sections, you can put any type of content, including XML, in anAttachmentPartobject. And because the SOAP part can contain only XML content, you must use anAttachmentPartobject for any content that is not in XML format.Creating an AttachmentPart Object and Adding Content
The
SOAPMessageobject creates anAttachmentPartobject, and the message also has to add the attachment to itself after content has been added. TheSOAPMessageclass has three methods for creating anAttachmentPartobject.The first method creates an attachment with no content. In this case, an
AttachmentPartmethod is used later to add content to the attachment.AttachmentPart attachment = message.createAttachmentPart();You add content to
attachmentwith theAttachmentPartmethodsetContent. This method takes two parameters, a JavaObjectfor the content, and aStringobject that gives the content type. Content in theSOAPBodypart of a message automatically has a Content-Type header with the value "text/xml" because the content has to be an XML document. In contrast, the type of content in anAttachmentPartobject has to be specified because it can be any type.Each
AttachmentPartobject has one or more headers associated with it. When you specify a type to the methodsetContent, that type is used for the header Content-Type. Content-Type is the only header that is required. You may set other optional headers, such as Content-Id and Content-Location. For convenience, JAXM providesgetandsetmethods for the headers Content-Type, Content-Id, and Content-Location. These headers can be helpful in accessing a particular attachment when a message has multiple attachments. For example, to access the attachments that have particular headers, you call theSOAPMessagemethodgetAttachmentsand pass it the header or headers you are interested in.The following code fragment shows one of the ways to use the method
setContent. The JavaObjectbeing added is aString, which contains plain text, so the second argument has to be "text/plain". The code also sets a content identifier, which can be used to identify thisAttachmentPartobject. After you have added content toattachment, you need to addattachmentto theSOAPMessageobject, which is done in the last line.String stringContent = "Update address for Sunny Skies " + "Inc., to 10 Upbeat Street, Pleasant Grove, CA 95439"; attachment.setContent(stringContent, "text/plain"); attachment.setContentId("update_address"); message.addAttachmentPart(attachment);The variable
attachmentnow represents anAttachmentPartobject that contains theStringstringContentand has a header that contains theString"text/plain". It also has a Content-Id header with "update_address" as its value. And nowattachmentis part ofmessage.Let's say you also want to attach a jpeg image showing how beautiful the new location is. In this case, the second argument passed to
setContentmust be "image/jpeg" to match the content being added. The code for adding an image might look like the following. For the first attachment, theObjectpassed to the methodsetContentwas aString. In this case, it is a stream.AttachmentPart attachment2 = message.createAttachmentPart(); byte[] jpegData = . . .; ByteArrayInputStream stream = new ByteArrayInputStream( jpegData); attachment2.setContent(stream, "image/jpeg"); message.addAttachmentPart(attachment);The other two
SOAPMessage.createAttachmentmethods create anAttachmentPartobject complete with content. One is very similar to theAttachmentPart.setContentmethod in that it takes the same parameters and does essentially the same thing. It takes a JavaObjectcontaining the content and aStringgiving the content type. As withAttachmentPart.setContent, theObjectmay be aString, a stream, ajavax.xml.transform.Source, or ajavax.activation.DataHandlerobject. You have already seen an example of using aSourceobject as content. The next example will show how to use aDataHandlerobject for content.The other method for creating an
AttachmentPartobject with content takes aDataHandlerobject, which is part of the JavaBeansActivation Framework (JAF). Using a
DataHandlerobject is fairly straightforward. First you create ajava.net.URLobject for the file you want to add as content. Then you create aDataHandlerobject initialized with the URL object and pass it to the methodcreateAttachmentPart.URL url = new URL("http://greatproducts.com/gizmos/img.jpg"); DataHandler dh = new DataHandler(url); AttachmentPart attachment = message.createAttachmentPart(dh); attachment.setContentId("gyro_image"); message.addAttachmentPart(attachment);You might note two things about the previous code fragment. First, it sets a header for Content-ID with the method
setContentId. This method takes aStringthat can be whatever you like to identify the attachment. Second, unlike the other methods for setting content, this one does not take aStringfor the Content-Type. This method takes care of setting the Content-Type header for you, which is possible because one of the things aDataHandlerobject does is determine the data type of the file it contains.Accessing an AttachmentPart Object
If you receive a message with attachments or want to change an attachment to a message you are building, you will need to access the attachments. When it is given no argument, the method
SOAPMessage.getAttachmentsreturns ajava.util.Iteratorobject over all theAttachmentPartobjects in a message. The following code prints out the content of eachAttachmentPartobject in theSOAPMessageobjectmessage.java.util.Iterator it = message.getAttachments(); while (it.hasNext()) { AttachmentPart attachment = it.next(); Object content = attachment.getContent(); String id = attachment.getContentId(); System.out.print("Attachment " + id + " contains: " + content); System.out.println(""); }Summary
You have now used the basic JAXM API and seen how to create and send SOAP messages as a standalone client and as a client using a messaging provider. You have added content to a SOAP header and a SOAP body and also created attachments and given them content. In addition, you have seen how to retrieve the content from the SOAP part and from attachments.
|
Home TOC |
|