Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WSDL Generator (3.0) and Attachments
Message
General information
Forum:
Visual FoxPro
Category:
Web Services
Title:
WSDL Generator (3.0) and Attachments
Miscellaneous
Thread ID:
00727263
Message ID:
00727263
Views:
53
*-- Updated on November 28


Erik,

Sorry to bother You and the rest of the community again but this time
its a short one. I've just tried this with VFP8 and have to say

IT WORKS EASILY AND GREAT!!!

In VFP8 the whole thing now properly works with code like this:
DEFINE CLASS Early01 as SESSION OLEPUBLIC

 PROCEDURE ProcessAttachment( toAttachIn As MSSOAP.ReceivedAttachments30 @) as boolean

    return .T.
 ENDPROC	
ENDDEFINE 
After creating the DLL the WSDLGenerator now smoothly runs through and shows the
"Specify Attachment Options"-Page, meaning that VFP8 now properly puts the "MSSOAP.ReceivedAttachments30" in the type-library in a way that a third party
Application can recognize it.

Sorry if I bothered You with this.

Regards from Berlin

Frank


*-- EOU


Erik,

after reading Your Article "Visual FoxPro 7.0: Program Your Data with Poweful new COM, XML, and WebServices Support", I thought "This is the man to ask before I throw this f... computer out of the window".

I am playing with Soap Toolkit 3.0 and want to do something with the new attachments stuff. I thought "have a look at it, and simply add some functionality to to your WebServices, ha, ha ha" - Now I'm spending about two days with it and am just about to bang my head against the wall.

It took me quite some time to understand the concept (I was looking for something to hook my Attachments-objects on to, just like a haeaderHandler-object), but I guess, now I'm on the train.

so far so good.

Simply rewrite the samplecode to VFP and see what the WSDL-Generator does... Nice! throws me an error:

"This key has already been assigned to an element in the Collection 457!"

Ok, Thanks for the detailed explanation WSDL-Generator, But there's definitely a good errorlist in the documentation - Surprise! No errors documented.

So strip down this thing and see where it hangs. Changed something here, something there and finally got to the next pages. The documentation said something about a page that allows me to select a place to temporarily put the attachments. However this never showed up. Instead I received:

"WSDLGenerator: Some of the datatypes encountered in the typelib where not mapped successfully..."

OK. Then I did, what I've never done before in my life - I swear - I opened my VB6 that I once installed with my Visual Studio and tried to do it there. I can read VB, but I've never learned it, nor have I ever tried to do anything with it. But I literally had this bloody DLL ready in 7 minutes. The WSDLGenerator took it, showed me the "where would You like to put Your temporary DIME-Docs"-page, created the WSDL-file that looked just like in the docs and said something like "welcome to the wonderful world of WebServices with Attachments".

I could write my own WSDL-stuff (as You have to do modifications when implementing HeaderHandlers) but that's not the way it should be, right? I did not even want to try it with VFP8. It should work with 7 also.

I am quite sure it has something to do with strong typing. The WSDLGenrator reads the Typelib and is not able to find a reference to the ReceivedAttachments30 - collection and therefore does not create the proper WSDL.

So I played with GetInterface(), as I thought early binding would be the trick and the Object in doubt is the parameter of the procedure. I tried several other things but could not get it straight forward. By now I am completely standing on the line and am willing to accept professional help from outside <g>.

This is the wonderful piece of code that I did in VB and that runs well (it was muuuuch more complicate but I've stripped it down to the veeeery basics. So don't wonder if it's not doing much).
Option Explicit
Public Function ProcessCollection( _
    ByVal ReceivedCollection As MSSOAPLib30.ReceivedAttachments30) As Boolean
    
ProcessCollection = True
 
End Function
And this is the VFP-Version (one of the thousand) that is not willing to go through the WSDLGenerator without arguing.
DEFINE CLASS Early01 as SESSION OLEPUBLIC

 PROCEDURE ProcessAttachment( toAttachIn As MSSOAPLib30.ReceivedAttachments30 @) as boolean
           *-- PROCEDURE ProcessAttachment( toAttachIn As Object @) as boolean

    loAttchIn = GetInterface(toAttachIn, ;
                "MSSOAPLib30.ReceivedAttachments30",;
                "{91147A58-DFE4-47C0-8E76-987FC1A6001B}")

 return .T.
 ENDPROC	
 
ENDDEFINE 
I've tried MSSOAP.ReceivedAttachments30 as well as several other versions. Now it's time for the strong-COM-typing expert.

Thanks for any hint or help in advance
Regards from Berlin

Frank

Dietrich Datentechnik (Berlin)
Softwarekombinat Teltow (Teltow)

Frank.Dietrich@dd-tech.de
DFPUG # 327
Reply
Map
View

Click here to load this message in the networking platform