Click here to Skip to main content
15,891,184 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Visual Studio Error Pin
WoodenLegNamedSmith2-Aug-12 7:58
WoodenLegNamedSmith2-Aug-12 7:58 
AnswerRe: Visual Studio Error Pin
Sakthivel Parasuraman2-Aug-12 23:57
Sakthivel Parasuraman2-Aug-12 23:57 
QuestionA simple contact form with validation Pin
Member 929983624-Jul-12 5:03
Member 929983624-Jul-12 5:03 
AnswerRe: A simple contact form with validation Pin
StianSandberg26-Jul-12 4:49
StianSandberg26-Jul-12 4:49 
QuestionFirst SOAP project coming up, need clarification Pin
MrAurora24-Jul-12 2:55
MrAurora24-Jul-12 2:55 
AnswerRe: First SOAP project coming up, need clarification Pin
jkirkerx24-Jul-12 8:22
professionaljkirkerx24-Jul-12 8:22 
GeneralRe: First SOAP project coming up, need clarification Pin
MrAurora25-Jul-12 0:22
MrAurora25-Jul-12 0:22 
GeneralRe: First SOAP project coming up, need clarification Pin
jkirkerx25-Jul-12 7:31
professionaljkirkerx25-Jul-12 7:31 
It's been a while since I have done SOAP. This is a small sample from a vendor of mine, that I wrote to. SOAP is sort of an XSD format, this sample has the enumerators in it. Perhaps it just a better written SOAP file than what you have. I can't post the whole thing due to my contract with them.

You can see the enumerated values, in which it can only be those choices. Like I said, SOAP is sort of like XSD,but is called a WSDL file.
<xs:simpleType name="NotificationSeverityType">
        <xs:annotation>
          <xs:documentation>Identifies the set of severity values.</xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
          <xs:enumeration value="ERROR"/>
          <xs:enumeration value="FAILURE"/>
          <xs:enumeration value="NOTE"/>
          <xs:enumeration value="SUCCESS"/>
          <xs:enumeration value="WARNING"/>
        </xs:restriction>
      </xs:simpleType>


I can write XSD off the top of my head, it took me years of practice to understand XSD, and soap is pretty similiar. I used Liquid XML Light when I started, in which they have a great GUI for designing and viewing XSD and SOAP files, plus you can run then, and create sample XML for testing to make sure you get the correct results.
MrAurora wrote:
I also see that in one line of code where he grabs a value from the returned data he parses an array and returns the 2nd element.

The file could be globalized, and for your use, he grabs the 2nd value. Or it could be conditional, in which 2 sets of data exist. I do the same thing, in XSD, you have to define all data fields or elements.

My answer is generic, because I don't know what your using, PHP, ASP.net, Sun Java, I write in ASP.Net, and have never done XSD or SOAP in PHP.

I just know that in ASP.Net, I can load the WSDL file as a reference object, and can write out my XML in the proper format, and send it to a test server, that will respond with error messages, telling me what is missing, or is malformed.
MrAurora wrote:
but seems to be impossible to just start coding away

Yes SOAP is frustrating, the first thing to learn is how to place the WSDL file in your project, turn it into an object,

Example:
In asp.net, you import the WSDL as a Web Service first, now you have a source

now you load the webservice as an object
Dim register As RegistrationService_V1.RegisterCSPUserRequest = New RegistrationService_V1.RegisterCSPUserRequest       ' Build a Register CSP User object

Now you type register. and look for your first element, then you create a new instance of that element, and program the child elements of that element
register.WebAuthenticationDetail = New RegistrationService_V1.WebAuthenticationDetail()
        register.WebAuthenticationDetail.CspCredential = New RegistrationService_V1.WebAuthenticationCredential
        register.WebAuthenticationDetail.CspCredential.Key = Product_CredentialKey
        register.WebAuthenticationDetail.CspCredential.Password = Product_CredentialPassword

When done packaging, you can transmit it, and your response will be the reply object. The transmission coordinates is built into the WSDL file. Regsiter is the SOAP WSDL file you built, reply is the response from the server, that is build into the SOAP file
 Dim reply As RegistrationService_V1.RegisterCSPUserReply = registerUser.registerCSPUser(register)
response_writer = New StreamWriter(Context.Server.MapPath("RegisterCSPUser_Response.xml"))
               response_serializer.Serialize(response_writer, reply)
               response_writer.Close()


Now you parse out the reply object

Select Case reply.HighestSeverity
 Case RegistrationService_V1.NotificationSeverityType.SUCCESS
  Success = True
  Credential_WebAuthenticationCredential_Key = reply.Credential.Key
  Credential_WebAuthenticationCredential_Password = reply.Credential.Password

  For Each notification As RegistrationService_V1.Notification In reply.Notifications
    NotificationMessage = notification.Message
  Next


It should be pretty close for PHP, same concept. Don't worry about the data, just get the framework going first, you can always call them or email them with your code, for help in the data part, or the response will say what's wrong.
GeneralRe: First SOAP project coming up, need clarification Pin
MrAurora27-Jul-12 0:56
MrAurora27-Jul-12 0:56 
GeneralRe: First SOAP project coming up, need clarification Pin
jkirkerx27-Jul-12 7:21
professionaljkirkerx27-Jul-12 7:21 
Question.net client, java soap web services , validation from soap headers Pin
Anuradhaanu22-Jul-12 23:08
Anuradhaanu22-Jul-12 23:08 
AnswerRe: .net client, java soap web services , validation from soap headers Pin
Richard MacCutchan23-Jul-12 3:20
mveRichard MacCutchan23-Jul-12 3:20 
Questionsending data to script on web server Pin
Danzy8321-Jul-12 11:42
Danzy8321-Jul-12 11:42 
AnswerRe: sending data to script on web server Pin
Sandeep Mewara21-Jul-12 19:58
mveSandeep Mewara21-Jul-12 19:58 
AnswerRe: sending data to script on web server Pin
David Mujica23-Jul-12 2:22
David Mujica23-Jul-12 2:22 
GeneralRe: sending data to script on web server Pin
Danzy8323-Jul-12 4:34
Danzy8323-Jul-12 4:34 
GeneralRe: sending data to script on web server Pin
Andrei Straut23-Jul-12 9:04
Andrei Straut23-Jul-12 9:04 
GeneralRe: sending data to script on web server Pin
David Mujica23-Jul-12 11:05
David Mujica23-Jul-12 11:05 
AnswerRe: sending data to script on web server Pin
jkirkerx23-Jul-12 10:17
professionaljkirkerx23-Jul-12 10:17 
QuestionCGI in Java - Legacy but interesting (for educational purposes) Pin
ppign20-Jul-12 23:15
ppign20-Jul-12 23:15 
AnswerRe: CGI in Java - Legacy but interesting (for educational purposes) Pin
Trak4Net21-Jul-12 11:22
Trak4Net21-Jul-12 11:22 
QuestionContact me Web page Pin
flinchy319-Jul-12 4:51
flinchy319-Jul-12 4:51 
AnswerRe: Contact me Web page Pin
R. Giskard Reventlov19-Jul-12 5:38
R. Giskard Reventlov19-Jul-12 5:38 
GeneralRe: Contact me Web page Pin
flinchy324-Jul-12 3:06
flinchy324-Jul-12 3:06 
GeneralRe: Contact me Web page Need Help Pin
flinchy326-Jul-12 4:35
flinchy326-Jul-12 4:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.