WebService client, files from delphi 2007 on d7 not working as it should!

Hello,

   I am currently developing webservice client connecting to server written in c#.

The problem is related to WebService components in d7 (THttptio).

1. On d7 version I get AccessVioletion if I don't put my app into DEP.

     Why is that on certain machines AV occurs on others not?

2. I found some files on your page with the soap sources from (delphi 2007 probably) which fixed AV problems
however executing methods I am getting an error: indicating problems with parameter: s.

3. If I finally create an app in delphi 2010 everything works perfectly as it should ...

Could you please give me some indication on my questions?
Is there anything I can do to make use of soap In delphi 7?

Thanks for help in advance!
0
Jan
10/28/2009 9:51:45 PM
embarcadero.delphi.non-tech 5933 articles. 1 followers. Follow

7 Replies
686 Views

Similar Articles

[PageSpeed] 26

> {quote:title=Jan Kowalski wrote:}{quote}
> Hello,
> 
>    I am currently developing webservice client connecting to server written in c#.
> 
> The problem is related to WebService components in d7 (THttptio).
> 
> 1. On d7 version I get AccessVioletion if I don't put my app into DEP.
> 
>      Why is that on certain machines AV occurs on others not?
> 
> 2. I found some files on your page with the soap sources from (delphi 2007 probably) which fixed AV problems
> however executing methods I am getting an error: indicating problems with parameter: s.
> 
> 3. If I finally create an app in delphi 2010 everything works perfectly as it should ...
> 
> Could you please give me some indication on my questions?
> Is there anything I can do to make use of soap In delphi 7?
> 
> Thanks for help in advance!

There is an entry in CodeCentral that backports Delphi 2007 web service fixes to Delphi 7, 2005 and 2006.  You'll have to use WSDLImp from the command line instead of the one built in to the IDE, though.  These may help in your situation.

http://cc.embarcadero.com/Item/24535

--
Regards
Bruce McGee
Glooscap Software
0
Bruce
10/28/2009 10:55:10 PM
> {quote:title=Jan Kowalski wrote:}{quote}
> Hello,
> 
>    I am currently developing webservice client connecting to server written in c#.
> 
> The problem is related to WebService components in d7 (THttptio).
> 
> 1. On d7 version I get AccessVioletion if I don't put my app into DEP.
> 
>      Why is that on certain machines AV occurs on others not?
> 
> 2. I found some files on your page with the soap sources from (delphi 2007 probably) which fixed AV problems
> however executing methods I am getting an error: indicating problems with parameter: s.
> 
> 3. If I finally create an app in delphi 2010 everything works perfectly as it should ...
> 
> Could you please give me some indication on my questions?
> Is there anything I can do to make use of soap In delphi 7?
> 
> Thanks for help in advance!

I misread your post the first time.  The code you mention in point 2 is probably the CodeCentral entry I mentioned.

If you haven't already, you should still try using the new units and re-importing the WSDL with the command line WSDLImp.  Our DEP problems went away in Delphi 2007, but I'm not sure if this is one of the fixes that was backported.

--
Regards
Bruce McGee
Glooscap Software
0
Bruce
10/29/2009 10:11:03 AM
> {quote:title=Bruce McGee wrote:}{quote}
> > {quote:title=Jan Kowalski wrote:}{quote}
> > Hello,
> > 
> >    I am currently developing webservice client connecting to server written in c#.
> > 
> > The problem is related to WebService components in d7 (THttptio).
> > 
> > 1. On d7 version I get AccessVioletion if I don't put my app into DEP.
> > 
> >      Why is that on certain machines AV occurs on others not?
> > 
> > 2. I found some files on your page with the soap sources from (delphi 2007 probably) which fixed AV problems
> > however executing methods I am getting an error: indicating problems with parameter: s.
> > 
> > 3. If I finally create an app in delphi 2010 everything works perfectly as it should ...
> > 
> > Could you please give me some indication on my questions?
> > Is there anything I can do to make use of soap In delphi 7?
> > 
> > Thanks for help in advance!
> 
> I misread your post the first time.  The code you mention in point 2 is probably the CodeCentral entry I mentioned.
> 
> If you haven't already, you should still try using the new units and re-importing the WSDL with the command line WSDLImp.  Our DEP problems went away in Delphi 2007, but I'm not sure if this is one of the fixes that was backported.
> 
> --
> Regards
> Bruce McGee
> Glooscap Software

Hi, 

   Thank you for quick response.

I have made test as follow:

New WSDL importer
 
   - Without new units (from d2007)

     -> Without DEP
   
       -> Result: Access Violation

     -> With DEP

       -> Works!

   - With included new units (from d2007)

     -> (With/Without DEP)
  
       -> Result: Answer from c# server: "Value cannot be null.
Parameter name: s"

So the conlucion is that new units give me the above error - I don't where it comes from ...
and which I cannot workaround ...

As i wrote previously, in delphi 2010 everything works ok, but this is the version of my friend
working in a different company. I have got only Delphi 7 enterprise edition.

Could you please tell me how I could fix the above problem?
0
Jan
11/3/2009 12:04:36 PM
Jan Kowalski wrote:

> Hi, 
> 
>    Thank you for quick response.
> 
> I have made test as follow:
> 
> New WSDL importer
>  
>    - Without new units (from d2007)
> 
>      -> Without DEP
>    
>        -> Result: Access Violation
> 
>      -> With DEP
> 
>        -> Works!
> 
>    - With included new units (from d2007)
> 
>      -> (With/Without DEP)
>   
>        -> Result: Answer from c# server: "Value cannot be
> null.
Parameter name: s"
> 
> So the conlucion is that new units give me the above error - I don't
> where it comes from ...  and which I cannot workaround ...
> 
> As i wrote previously, in delphi 2010 everything works ok, but this
> is the version of my friend working in a different company. I have
> got only Delphi 7 enterprise edition.
> 
> Could you please tell me how I could fix the above problem?

It sounds like one of the parameters is being sent as a null that the
C# end is expecting to be populated.  This means the XML might not be
completely correct with the "fixed" units.

You can see the XML being sent to and received from the server in
THTTPRIO's BeforeExecute and AfterExecute events.

Compare the XML being sent with and without the new units to see what's
missing and populate that parameter explicitly in your code.

Let me know if this helps.

-- 
Regards,
Bruce McGee
Glooscap Software
0
Bruce
11/3/2009 5:51:54 PM
> It sounds like one of the parameters is being sent as a null that the
> C# end is expecting to be populated.  This means the XML might not be
> completely correct with the "fixed" units.
> 
> You can see the XML being sent to and received from the server in
> THTTPRIO's BeforeExecute and AfterExecute events.
> 
> Compare the XML being sent with and without the new units to see what's
> missing and populate that parameter explicitly in your code.
> 
> Let me know if this helps.
> 
> -- 
> Regards,
> Bruce McGee
> Glooscap Software


Thanks for the hint ...

My method was like this:

<Run xmlns="http://SRV.WebService/"><methodXml>sdfsd</methodXml><dataXml>sdf</dataXml></Run>

New units does this:

<Run xmlns="http://SRV.WebService/"><xsd:methodXml>sdfsd</xsd:methodXml><xsd:dataXml>sdf</xsd:dataXml></Run>

I just replaced the string in beforeExecute method and it worked out, but:

1) Is there anything we could do to avoid such problem? (without manual changing the request)

2) Is there a chance that Embarcadero could fix that issue? (for d2007 units, which could be used in d7)

Thanks!
0
Jan
11/4/2009 7:28:51 AM
> {quote:title=Jan Kowalski wrote:}{quote}
> > It sounds like one of the parameters is being sent as a null that the
> > C# end is expecting to be populated.  This means the XML might not be
> > completely correct with the "fixed" units.
> > 
> > You can see the XML being sent to and received from the server in
> > THTTPRIO's BeforeExecute and AfterExecute events.
> > 
> > Compare the XML being sent with and without the new units to see what's
> > missing and populate that parameter explicitly in your code.
> > 
> > Let me know if this helps.
> > 
> > -- 
> > Regards,
> > Bruce McGee
> > Glooscap Software
> 
> 
> Thanks for the hint ...
> 
> My method was like this:
> 
> <Run xmlns="http://SRV.WebService/"><methodXml>sdfsd</methodXml><dataXml>sdf</dataXml></Run>
> 
> New units does this:
> 
> <Run xmlns="http://SRV.WebService/"><xsd:methodXml>sdfsd</xsd:methodXml><xsd:dataXml>sdf</xsd:dataXml></Run>
> 
> I just replaced the string in beforeExecute method and it worked out, but:
> 
> 1) Is there anything we could do to avoid such problem? (without manual changing the request)
> 
> 2) Is there a chance that Embarcadero could fix that issue? (for d2007 units, which could be used in d7)
> 
> Thanks!

That wasn't what I was expecting.  I thought the second call would be missing a parameter.  Did you generate the .pas file from the .wsdl inside Delphi for the first case and using the new WSDLImp from the command line for the second?  Are they very different?  I suspect the problem is in the runtime units, though.

1) I'm not sure how you would fix this.  You might want to drop a line to Bruneau.Babet at Embarcadero.

2) You never know, but I find it unlikely.

--
Regards
Bruce McGee
Glooscap Software
0
Bruce
11/4/2009 11:33:54 AM
> 
> That wasn't what I was expecting.  I thought the second call would be missing a parameter.  Did you generate the .pas file from the .wsdl inside Delphi for the first case and using the new WSDLImp from the command line for the second?  Are they very different?  I suspect the problem is in the runtime units, though.
> 
> 1) I'm not sure how you would fix this.  You might want to drop a line to Bruneau.Babet at Embarcadero.
> 
> 2) You never know, but I find it unlikely.
> 
> --
> Regards
> Bruce McGee
> Glooscap Software


Hi,

   At the following link you may find two requests based on the units generated from d7 and d2007 wsdl generators.
http://pastebin.com/m10e9a645

In both units I get:

"Value cannot be null.
Parameter name: s"


I will write to Embarcadero,

Thanks for your time,

Edited by: Jan Kowalski on Nov 4, 2009 6:14 AM

Edited by: Jan Kowalski on Nov 4, 2009 6:16 AM
0
Jan
11/4/2009 2:16:52 PM
Reply:

Similar Artilces:

How to use a delphi XE3 obj file in delphi 2007?
Hi, I'm migrating an application from delphi 2007 to delphi XE3 and I would like to do it in several steps. To do this I need to use a part of my new code (XE3) in the current delphi 2007 application. So I want to use the .obj file from my XE3 file. I know I have to use the {$L 'Filename'} and I know that I have to declare the functions that I want to use in external in my D2007 project. I wanted to make an easy and simple example to see how it works with only 1 function 'hello world' compiled in obj with XE3 but I can't find the way to use it in D2007. In D200...

Delphi 4 to Delphi 2007
Hello, I will have to port a D4 application (with source) to D2007. what kind of problem could I face ? I will have to go to customer site tommorow to analyse its source code to quote the work, what should I care of to hestimate the porting time ? Thanks John Terry wrote: > Hello, > I will have to port a D4 application (with source) to D2007. > what kind of problem could I face ? > I will have to go to customer site tommorow to analyse its source code > to quote the work, what should I care of to hestimate the porting time ? You can probably do it by just changi...

Delphi 2007 to Delphi 7
I've written a class in Delphi 2007 that is not supported in Delphi 7. What would be the best way to achive what I've done in Delphi 2007 in Delphi 7? Thanks, Tom type BondConstants = class { Bond Types } type BondType = record const TREASURY = 3; AGENCY = 0; CORP = 1; MUNI = 2; SBA = 5; MBS = 4; CMO = 6; end; { Day Count Methods } type DayCount = record const ACTUAL_360 = 2; ACTUAL_365 = 1; ACTUAL_ACTUAL = 1; d30_360 = 0; ...

Moving from Delphi 7 to Delphi 2007
Is there any compelling reason to move (quite a large project) from Delphi 7 to Delphi 2007? Specifically, is there better Vista/Win7/Win8 integration provided by Delphi 2007? (In the project I am already using a custom manifest file for Vista/Win7 etc.. and not the std XPMan component) Does 2007 add any new bugs to the scene? Thanks Rael Rael wrote: > Is there any compelling reason to move (quite a large project) from > Delphi 7 to Delphi 2007? If you are going to upgrade, why not upgrade to something newer? > In the project I am already using a custom man...

Delphi 2007 RTL in Delphi 7
I read somewhere that it is possible to use Delphi 2007's (or for that matter Delphi 2006's) RTL in Delphi 7 by just recompiling the source of RTL. Is this really possible? What are the benefits that we can derive using a higher version's RTL? TIA Yogi Yang Yogi Yang wrote: > I read somewhere that it is possible to use Delphi 2007's (or for > that matter Delphi 2006's) RTL in Delphi 7 by just recompiling the > source of RTL. If it actually compiles in Delphi 7, I guess it would be possible. OTOH, if one has Delphi 2007 already, I don't s...

Migrate from Delphi 2007 to Delphi 2010
Hi All, Thanks in advance for your help. Below is my query, Currently I am using Delphi 2007 and i want to migrate to Delphi 2010. 1. What all things i need to take care while doing this? 2. What all third party components will get impacted? 3. Any known issues in Delphi 2010 which might impact the cause? 4. Any changes in database operation required as i am using Oracle? Hope I have post this query under correct category. If not sorry for the trouble and could you please suggest me the correct category for this? Looking forward for your response. Have a great day. Th...

is there a Delphi 2007
Would be nice to have a bundle of the latest Delphi packages. Gilbert Padilla wrote: > Would be nice to have a bundle of the latest Delphi packages. > I expect Delphi 2007 will only be on sale until the full RAD Studio 2009 edition is published, including Delphi 2009.net. W ...

Delphi 2010 w Delphi 2007
I have D2007 installed on my laptop (XP sp3 running on dual core Athlon). Can I install D2010 on this machine without it affecting D2007? Will D2010 affect D2007 in any way? Thanks, Randall Carpenter > {quote:title=Randall Carpenter wrote:}{quote} > I have D2007 installed on my laptop (XP sp3 running on dual core Athlon). > Can I install D2010 on this machine without it affecting D2007? Will D2010 > affect D2007 in any way? Won't hurt a thing. I have D7, RAD Studio 2007, RAD Studio 2009, and RAD Studio 2010 all on my desktop system and they coexist fine. Jus...

Delphi 2009 alongside Delphi 2007
Hi all, I am about to install Delphi 2009 on the same development system as Delphi 2007, before I embark is there anything I should be aware of so as to not break my Delphi 2007 installation and projects ? Thanks JT John Taylor wrote: > Hi all, > > I am about to install Delphi 2009 on the same development system > as Delphi 2007, before I embark is there anything I should be aware > of so as to not break my Delphi 2007 installation and projects ? As long as you install into a separate folder there is no problem with the two versions getting into each other...

Delphi 2007 to Delphi 2009 Conversion
CharArrayPtr = ^CharArray; CharArray = array[0..MaxInt-1] of Char; How to convert to Delphi 2009? Bill Bill Miller wrote: > CharArrayPtr = ^CharArray; > CharArray = array[0..MaxInt-1] of Char; > > How to convert to Delphi 2009? > > Bill it depends heavelly on how it is used fearther down in your project and what you want to convert it to. I you want to simple convert the declarations ignoring UNicode altogether then the only think you have to change is the CharArray declaratin from a Char to an AnsiChar eg CharArrayPtr = ^CharArray; CharArray =...

Code Porting
Hi people, Basically, I am moving an app from Delphi 5 to Delphi 2009 which is all great (yeah right!) and I am having a couple of issues with some thirdparty components that we have the source code for. Being that I wanted to make the task as easy as possible, I was able to download the component in Delphi 2007 format. I have now managed to port that to 2009 so it compiles only with warnings and no errors. So all is good at this moment. Now I am trying to install the component into the IDE by using the install menu option from the project manager. This is where I run into errors. ...

Why does this work fine in Delphi 2009, but not in Delphi 2010
I've been racking my head trying to figure this out and can't understand what is wrong, TFileStream.ReadComponentRes fails when I try to read a component containing a record, it works fine in Delphi 2009 and Delphi 2007, but fails with Delphi 2010 Here is the unit source and DFM *+//UnitSource+* unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TThresholdMode = (tm0,tm1,tm2,tm3,tm4,tm5); TThreshold = Record Mode:TThresholdMode; Filter,Start,Stop:Integer; end; ...

Migrate from Delphi 2007 for Win32 to Delphi XE
we use Delphi 2007 for Win32 to support legacy (32Bit) OWL-based pascal applications (yes i know it was a mistake not to switch to VCL 15 years ago). could our applications still be opened and compiled with Delphi XE? The existing projects are all plain Pascal-Code, coming back from the times of Turbo Pascal for Windows and later on Borland Pascal. Are there any improvements we could profit from (i.e IDE, Debugger)? Thanks Andrej > {quote:title=Andrej Dimic wrote:}{quote} > could our applications still be opened and compiled with Delphi XE? I'm not sure, but I guess ...

Saving files in Delphi 2007
Hi all, In my program there are files to be saved. Now they are saved in the directory where the original files were. Now I want to give the user of the progral the ability the choose a directory or to make an additional directory where he/she can save these files. Can someone tell me how I can do this in my program ? Miguel Blauwbloeme wrote: > Can someone tell me how I can do this in my program ? I am not sure I understand your question. The short answer is display a TSaveDialog from the Dialogs group of the component palette. Let the user select the location and name to...

Web resources about - WebService client, files from delphi 2007 on d7 not working as it should! - embarcadero.delphi.non-tech

webservices Articles, Posts, Blogs, Videos - Technorati
— Authority: The job consist in a PHP program that read a file, compose a message (email or sms) and call an API of email provider (Amazon SES) ...

Section: software:webservices
Wired.com © 2012 Condé Nast. All rights reserved. Use of this Site constitutes acceptance of our User Agreement (effective 3/21/12) and Privacy ...

Products - CrunchBase
Product profiles

App Search on Flickr - Application Sharing!
Flickr is almost certainly the best online photo management and sharing application in the world. Show off your favorite photos and videos to ...

Wikipedia:Press coverage 2005 - Wikipedia, the free encyclopedia
If you add an article, please cite both the title and the source. Note that if you're listing an article from a traditional press wire service ...

Entity–relationship model - Wikipedia, the free encyclopedia
In software engineering , an entity-relationship model ( ER model for short) is an abstract and conceptual representation of data . Entity-relationship ...

Entity-relationship model - Wikipedia, the free encyclopedia
In software engineering , an entity-relationship model ( ER model for short) is an abstract and conceptual representation of data . Entity-relationship ...

IT and Telecommunications Jobs in Melbourne Metro - MyCareer
Find IT and Telecommunications Jobs in Melbourne Metro on MyCareer. Fresh IT and Telecommunications Jobs posted daily. Free email alerts and ...

AWS Elastic Beanstalk: A Quick and Simple Way into the Cloud
Flexibility is one of the key principles of Amazon WebServices - developers can select any programming language and software package,any operating ...

How To Use the Amazon SDK for Android to Upload Photos to Amazon S3
This article demonstrates how to use the AWS SDK for Android to upload an image to Amazon Simple Storage Service (S3) from your mobile device ...

Resources last updated: 1/16/2016 7:48:26 PM