1 28 29 package com.caucho.jws; 30 31 import java.io.ByteArrayInputStream ; 32 import java.io.InputStream ; 33 34 public class SoapCall { 35 36 private Envelope _envelope = null; 37 38 public SoapCall() 39 { 40 } 41 42 public SoapCall(String s) throws Exception 43 { 44 this(new ByteArrayInputStream (s.getBytes())); 45 } 46 47 public SoapCall(InputStream is) throws Exception 48 { 49 new com.caucho.config.Config().configure(this, is); 50 } 51 52 public String toString() 53 { 54 return "<soapcall>"+_envelope+"</soapcall>"; 55 } 56 57 public Envelope.Body createBody() { 58 return createEnvelope().createBody(); 59 } 60 public Envelope createEnvelope() 61 { 62 if (_envelope == null) 63 _envelope = new Envelope(); 64 65 return _envelope; 66 } 67 68 public class Envelope { 69 private Body _body; 70 71 public Body createBody() 72 { 73 if (_body == null) 74 _body = new Body(); 75 76 return _body; 77 } 78 79 public String toString() 80 { 81 return "<envelope>"+_body+"</envelope>"; 82 } 83 84 public class Body { 85 86 public CallResponse _callResponse; 87 88 public CallResponse createNullCallResponse() { 89 if (_callResponse == null) 90 _callResponse = new CallResponse(); 91 92 return _callResponse; 93 } 94 95 public String toString() 96 { 97 return "<body>"+_callResponse+"</body>"; 98 } 99 100 public class CallResponse 101 { 102 public String toString() 103 { 104 return "<nullCallResponse/>"; 105 } 106 } 107 } 108 } 109 } 110 | Popular Tags |